summaryrefslogtreecommitdiff
path: root/sd/source/ui/docshell/docshell.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/docshell/docshell.cxx')
-rw-r--r--sd/source/ui/docshell/docshell.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index 843235c4b018..c9ee2b62c7c9 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -274,9 +274,12 @@ void DrawDocShell::GetState(SfxItemSet &rSet)
case SID_NOTEBOOKBAR:
{
- bool bVisible = sfx2::SfxNotebookBar::StateMethod(mpViewShell->GetFrame()->GetBindings(),
- "modules/simpress/ui/");
- rSet.Put( SfxBoolItem( SID_NOTEBOOKBAR, bVisible ) );
+ if (mpViewShell)
+ {
+ bool bVisible = sfx2::SfxNotebookBar::StateMethod(mpViewShell->GetFrame()->GetBindings(),
+ "modules/simpress/ui/");
+ rSet.Put( SfxBoolItem( SID_NOTEBOOKBAR, bVisible ) );
+ }
}
break;