[Libreoffice-commits] core.git: sd/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon Oct 3 11:48:32 UTC 2016
sd/source/ui/docshell/docshell.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 6534421e88c1edd245edfd4ca70dd4e6aa8be8e9
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Oct 3 09:16:04 2016 +0200
sd: mpViewShell can be nullptr in DrawDocShell::GetState()
Start Impress, e.g. go to Tools -> Macros -> Organize macros -> Basic,
then start editing a macro -> crash.
Change-Id: Ie54a3467e0121c9f87834129ba89fe6485fea552
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index 843235c..c9ee2b6 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;
More information about the Libreoffice-commits
mailing list