[Libreoffice-commits] core.git: sfx2/source

Szymon Kłos eszkadev at gmail.com
Wed Sep 7 19:15:46 UTC 2016


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

New commits:
commit 56fdbdbe51d10d08936f4514bef82887000ea53c
Author: Szymon Kłos <eszkadev at 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.Mehrbrodt at cib.de>
    Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at 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


More information about the Libreoffice-commits mailing list