summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sd/source/ui/docshell/docshel4.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index d9b9ff6e8e42..e261a6e0775a 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -819,10 +819,13 @@ void DrawDocShell::GotoBookmark(const OUString& rBookmark)
pDrawViewShell->SwitchPage(nSdPgNum);
}
- // show page
- SvxZoomItem aZoom;
- aZoom.SetType( SvxZoomType::WHOLEPAGE );
- pDrawViewShell->GetDispatcher()->ExecuteList(SID_ATTR_ZOOM, SfxCallMode::ASYNCHRON, { &aZoom });
+ if (pDrawViewShell->GetDispatcher())
+ {
+ // show page
+ SvxZoomItem aZoom;
+ aZoom.SetType( SvxZoomType::WHOLEPAGE );
+ pDrawViewShell->GetDispatcher()->ExecuteList(SID_ATTR_ZOOM, SfxCallMode::ASYNCHRON, { &aZoom });
+ }
if (pObj != nullptr)
{