diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2016-09-07 11:22:22 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-09-07 19:15:24 +0000 |
commit | 56fdbdbe51d10d08936f4514bef82887000ea53c (patch) | |
tree | 2791d75c66d40798a5058db7ea1c2be4d5fb9600 /sfx2 | |
parent | 95c91f098e8974c41c8d403a351fe53db6822165 (diff) |
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@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 659fbf95e6b9..b78255b1e17a 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 |