diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-09-30 14:35:11 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-09-30 17:34:25 +0200 |
commit | 3a218acef4004d8f4dc53bf904127b2a7de3f96a (patch) | |
tree | fa5e26103546487badab21248bf9e9d3ffc43ac2 /sc/source/ui/unoobj/tokenuno.cxx | |
parent | bc8a11cf663c41fbe3245640a6159bd0ea6d9ce7 (diff) |
sc: lock SolarMutex before calling ScDocument::RemoveUnoObject()
This can race against other threads calling AddUnoObject(), and
hopefully this should fix the assert from SfxBroadcaster::AddListener()
line 96 that has been observed in sc_unoapi.
Change-Id: Ia2dd38a499c51a77c54cffe9dde31e14053ae0e5
Diffstat (limited to 'sc/source/ui/unoobj/tokenuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/tokenuno.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx index 47738aaf2a28..5e5d595ba359 100644 --- a/sc/source/ui/unoobj/tokenuno.cxx +++ b/sc/source/ui/unoobj/tokenuno.cxx @@ -72,6 +72,8 @@ ScFormulaParserObj::ScFormulaParserObj(ScDocShell* pDocSh) : ScFormulaParserObj::~ScFormulaParserObj() { + SolarMutexGuard g; + if (mpDocShell) mpDocShell->GetDocument().RemoveUnoObject(*this); } |