diff options
Diffstat (limited to 'sd/source/ui/dlg/sdtreelb.cxx')
-rw-r--r-- | sd/source/ui/dlg/sdtreelb.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index fadcd450b170..98542f75cdfa 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -945,7 +945,9 @@ void SdPageObjsTLV::SetSdNavigator(SdNavigatorWin* pNavigator) void SdPageObjsTLV::SetViewFrame(const SfxViewFrame* pViewFrame) { sd::ViewShellBase* pBase = sd::ViewShellBase::GetViewShellBase(pViewFrame); - const css::uno::Reference< css::frame::XFrame > xFrame = pBase->GetMainViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(); + std::shared_ptr<sd::ViewShell> xViewShell = pBase->GetMainViewShell(); + SAL_WARN_IF(!xViewShell, "sd", "null pBaseViewFrame"); + const css::uno::Reference< css::frame::XFrame > xFrame = xViewShell ? xViewShell->GetViewFrame()->GetFrame().GetFrameInterface() : nullptr; m_xAccel->init(::comphelper::getProcessComponentContext(), xFrame); } |