summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-11-08 17:18:44 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-11-08 17:18:44 +0100
commit5d80555938c26e1426a0d72ec40b4ec873530745 (patch)
tree2ad13c601ed87d07e21511df6cb21f7710fcb12c /framework
parent991dad0a93ab6cefb2847ef1a98df87bcacd1fb1 (diff)
Return early from double ToolBarManager::dispose
...if that should ever happen. Also means that ToolBarManager::RemoveControllers will now only be called with m_bDispose being false. Change-Id: If17d60f291cc8dad19d6f6e33d39e08c7f8ad7aa
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/toolbarmanager.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 26d7e50f124a..6f5b27ec5dfa 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -16,6 +16,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <cassert>
+
#include <uielement/toolbarmanager.hxx>
#include <uielement/generictoolbarcontroller.hxx>
@@ -454,6 +458,11 @@ void SAL_CALL ToolBarManager::dispose() throw( RuntimeException, std::exception
{
SolarMutexGuard g;
+ if (m_bDisposed)
+ {
+ return;
+ }
+
RemoveControllers();
if ( m_xDocImageManager.is() )
@@ -616,9 +625,7 @@ void SAL_CALL ToolBarManager::elementReplaced( const css::ui::ConfigurationEvent
void ToolBarManager::RemoveControllers()
{
DBG_TESTSOLARMUTEX();
-
- if ( m_bDisposed )
- return;
+ assert(!m_bDisposed);
m_aSubToolBarControllerMap.clear();