framework/source/uielement/toolbarmanager.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
New commits: commit 5d80555938c26e1426a0d72ec40b4ec873530745 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Nov 8 17:18:44 2016 +0100 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 diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 26d7e50..6f5b27e 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(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits