diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-11-29 11:29:19 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-11-29 11:29:19 +0100 |
commit | f108d9f088127050c641b1dd119d54179f4371e3 (patch) | |
tree | a7b7dbbce9266d3d4ab7dca8d97c6da045ec7214 /linguistic | |
parent | 0f4777a19634e64db884f39611be0d5075ea24e3 (diff) |
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
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/lngsvcmgr.cxx | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index 20ea193fc603..9ac96561898b 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 |