summaryrefslogtreecommitdiff
path: root/sd/source/ui/docshell/docshel4.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/docshell/docshel4.cxx')
-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 465ccf4481bb..51063a02cc57 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -836,10 +836,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)
{