linguistic/source/lngsvcmgr.cxx |   24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

New commits:
commit f108d9f088127050c641b1dd119d54179f4371e3
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Tue Nov 29 11:29:19 2016 +0100

    Idle::Start must be called with SolarMutex locked
    
    ...as asserted now since c00d8271ba443c4f0acf657c226eea4824597f95 "vcl: 
assert
    solar mutex is held for various timer / scheduler ops."  Caused that assert 
to
    fire when adding an extension via "Tools - Extension Manager... Add".
    
    Change-Id: I86eeb2c4a83c3dff98ba9012c068af91e7932df6

diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 20ea193..9ac9656 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -29,6 +29,7 @@
 #include <com/sun/star/linguistic2/ProofreadingIterator.hpp>
 
 #include <unotools/lingucfg.hxx>
+#include <vcl/svapp.hxx>
 #include <comphelper/processfactory.hxx>
 #include <i18nlangtag/lang.h>
 #include <i18nlangtag/languagetag.hxx>
@@ -479,17 +480,22 @@ LngSvcMgr::LngSvcMgr()
 void LngSvcMgr::modified(const lang::EventObject&)
     throw(uno::RuntimeException, std::exception)
 {
-    osl::MutexGuard aGuard(GetLinguMutex());
-    //assume that if an extension has been added/removed that
-    //it might be a dictionary extension, so drop our cache
+    {
+        osl::MutexGuard aGuard(GetLinguMutex());
+        //assume that if an extension has been added/removed that
+        //it might be a dictionary extension, so drop our cache
 
-    clearSvcInfoArray(pAvailSpellSvcs);
-    clearSvcInfoArray(pAvailGrammarSvcs);
-    clearSvcInfoArray(pAvailHyphSvcs);
-    clearSvcInfoArray(pAvailThesSvcs);
+        clearSvcInfoArray(pAvailSpellSvcs);
+        clearSvcInfoArray(pAvailGrammarSvcs);
+        clearSvcInfoArray(pAvailHyphSvcs);
+        clearSvcInfoArray(pAvailThesSvcs);
+    }
 
-    //schedule in an update to execute in the main thread
-    aUpdateIdle.Start();
+    {
+        SolarMutexGuard aGuard;
+        //schedule in an update to execute in the main thread
+        aUpdateIdle.Start();
+    }
 }
 
 //run update, and inform everyone that dictionaries (may) have changed, this
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to