diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-06-10 15:53:56 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-06-11 10:02:50 +0200 |
commit | 82b46d1683a0817583e8749b4076082b2de6782b (patch) | |
tree | f88bbdce648331124e4b27ff3ebf07165c74e463 /cui | |
parent | 44a56e277f7e4d222767fa82f0bce2e7f51be6ca (diff) |
Resolves: tdf#133862 crash in customize toolbar in embedded math
Change-Id: I2fc7f3620145e48516c3ca73c0a5d08dce11d78a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96034
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/SvxNotebookbarConfigPage.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx index 584767d6af5a..0fb05678b1e1 100644 --- a/cui/source/customize/SvxNotebookbarConfigPage.cxx +++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx @@ -418,6 +418,8 @@ void SvxNotebookbarConfigPage::SelectElement() OString sUIFileUIPath = CustomNotebookbarGenerator::getSystemPath( CustomNotebookbarGenerator::getCustomizedUIPath()); xmlDocPtr pDoc = xmlParseFile(sUIFileUIPath.getStr()); + if (!pDoc) + return; xmlNodePtr pNodePtr = xmlDocGetRootElement(pDoc); std::vector<NotebookbarEntries> aEntries; @@ -479,10 +481,7 @@ void SvxNotebookbarConfigPage::SelectElement() aEntries.clear(); - if (pDoc != nullptr) - { - xmlFreeDoc(pDoc); - } + xmlFreeDoc(pDoc); } SvxNotebookbarEntriesListBox::SvxNotebookbarEntriesListBox(std::unique_ptr<weld::TreeView> xParent, |