sd/source/ui/docshell/docshell.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 6534421e88c1edd245edfd4ca70dd4e6aa8be8e9
Author: Miklos Vajna <vmik...@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;
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to