diff options
Diffstat (limited to 'cui/source/customize/SvxNotebookbarConfigPage.cxx')
-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 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, |