sfx2/source/appl/appserv.cxx |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 56fdbdbe51d10d08936f4514bef82887000ea53c
Author: Szymon Kłos <eszka...@gmail.com>
Date:   Wed Sep 7 11:22:22 2016 +0200

    Notebookbar: fixed crash while using two modules simultaneously
    
    Before patch after opening e.g. Writer and Calc with active Notebookbar
    crashed application.
    
    Change-Id: I0eb18778ff23acce19d662156185480c6112eaa1
    Reviewed-on: https://gerrit.libreoffice.org/28715
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
    Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 659fbf9..b78255b 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -860,12 +860,11 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
                     }
 
                     // Show/Hide the Notebookbar
-                    for ( SfxObjectShell *pObjSh = SfxObjectShell::GetFirst();
-                        pObjSh;
-                        pObjSh = SfxObjectShell::GetNext( *pObjSh ) )
+                    SfxObjectShell* pCurrentShell = SfxObjectShell::Current();
+                    if ( pCurrentShell )
                     {
                         const SfxPoolItem *pItem;
-                        pObjSh->GetDispatcher()->QueryState(SID_NOTEBOOKBAR, 
pItem);
+                        
pCurrentShell->GetDispatcher()->QueryState(SID_NOTEBOOKBAR, pItem);
                     }
 
                     // Save settings
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to