cui/source/customize/CustomNotebookbarGenerator.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit b1f9e704cb9148b6e211005dab0cd153957a1b2b Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Dec 1 14:41:19 2019 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sun Dec 1 20:07:40 2019 +0100 Resolves: tdf#129119 no SfxViewFrame in startcenter Change-Id: I16d8207314146df3dd7f5b11182650066cc97fde Reviewed-on: https://gerrit.libreoffice.org/84148 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/cui/source/customize/CustomNotebookbarGenerator.cxx b/cui/source/customize/CustomNotebookbarGenerator.cxx index 8c135b96b8ff..374b1450ae97 100644 --- a/cui/source/customize/CustomNotebookbarGenerator.cxx +++ b/cui/source/customize/CustomNotebookbarGenerator.cxx @@ -215,10 +215,13 @@ void CustomNotebookbarGenerator::modifyCustomizedUIFile(const Sequence<OUString> void CustomNotebookbarGenerator::getFileNameAndAppName(OUString& sAppName, OUString& sNotebookbarUIFileName) { + SfxViewFrame* pFrame = SfxViewFrame::Current(); + if (!pFrame) + return; + const auto xContext = comphelper::getProcessComponentContext(); utl::OConfigurationTreeRoot aRoot(xContext, "org.openoffice.Office.UI.ToolbarMode/", false); - const Reference<frame::XFrame>& xFrame - = SfxViewFrame::Current()->GetFrame().GetFrameInterface(); + const Reference<frame::XFrame>& xFrame = pFrame->GetFrame().GetFrameInterface(); const Reference<frame::XModuleManager> xModuleManager = frame::ModuleManager::create(xContext); vcl::EnumContext::Application eApp _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits