summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-06-10 15:53:56 +0100
committerMichael Meeks <michael.meeks@collabora.com>2020-06-12 16:29:13 +0100
commit6838dd995587b47875c7d43ab9c3e4516170f8e6 (patch)
treef4dd94ef0b61d652d765deb589b12e57335b43ee /cui
parenta856c45f59dee01a4d21b7ccc97606d474581e7c (diff)
Resolves: tdf#133862 crash in customize toolbar in embedded math
Change-Id: I2fc7f3620145e48516c3ca73c0a5d08dce11d78a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96035 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/SvxNotebookbarConfigPage.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx
index c8270b941385..198a19f57782 100644
--- a/cui/source/customize/SvxNotebookbarConfigPage.cxx
+++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx
@@ -433,6 +433,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;
@@ -494,10 +496,7 @@ void SvxNotebookbarConfigPage::SelectElement()
aEntries.clear();
- if (pDoc != nullptr)
- {
- xmlFreeDoc(pDoc);
- }
+ xmlFreeDoc(pDoc);
}
SvxNotebookbarEntriesListBox::SvxNotebookbarEntriesListBox(std::unique_ptr<weld::TreeView> xParent,