framework/source/uielement/statusbarmanager.cxx |   25 +++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)

New commits:
commit cb34498395a5eb0d33fb019c2ec8534f8854afcd
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Tue Nov 8 16:14:32 2016 +0100

    Clean up (calls to) StatusBarManger::RemoveControllers
    
    ...which turns out to be only called with SolarMutex locked and m_bDisposed
    being false
    
    Change-Id: I454e7951ea579fb6d9dc71d0aabebd373380b3e4

diff --git a/framework/source/uielement/statusbarmanager.cxx 
b/framework/source/uielement/statusbarmanager.cxx
index 9b6a86b..0c0e0e6 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -50,6 +50,7 @@
 #include <vcl/settings.hxx>
 #include <vcl/commandinfoprovider.hxx>
 
+#include <cassert>
 #include <functional>
 
 using namespace ::com::sun::star;
@@ -161,21 +162,17 @@ throw ( uno::RuntimeException, std::exception )
 
 void SAL_CALL StatusBarManager::disposing( const lang::EventObject& Source ) 
throw ( uno::RuntimeException, std::exception )
 {
-    {
-        SolarMutexGuard g;
-        if ( m_bDisposed )
-            return;
-    }
+    SolarMutexGuard g;
+
+    if ( m_bDisposed )
+        return;
 
     RemoveControllers();
 
-    {
-        SolarMutexGuard g;
-        if ( Source.Source == uno::Reference< uno::XInterface >( m_xFrame, 
uno::UNO_QUERY ))
-            m_xFrame.clear();
+    if ( Source.Source == uno::Reference< uno::XInterface >( m_xFrame, 
uno::UNO_QUERY ))
+        m_xFrame.clear();
 
-        m_xContext.clear();
-    }
+    m_xContext.clear();
 }
 
 // XComponent
@@ -279,10 +276,8 @@ void StatusBarManager::UpdateControllers()
 
 void StatusBarManager::RemoveControllers()
 {
-    SolarMutexGuard g;
-
-    if ( m_bDisposed )
-        return;
+    DBG_TESTSOLARMUTEX();
+    assert(!m_bDisposed);
 
     std::for_each( m_aControllerMap.begin(),
                    m_aControllerMap.end(),
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to