summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj/notesuno.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-09-30 14:35:11 +0200
committerMichael Stahl <mstahl@redhat.com>2014-09-30 17:34:25 +0200
commit3a218acef4004d8f4dc53bf904127b2a7de3f96a (patch)
treefa5e26103546487badab21248bf9e9d3ffc43ac2 /sc/source/ui/unoobj/notesuno.cxx
parentbc8a11cf663c41fbe3245640a6159bd0ea6d9ce7 (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/notesuno.cxx')
-rw-r--r--sc/source/ui/unoobj/notesuno.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/ui/unoobj/notesuno.cxx b/sc/source/ui/unoobj/notesuno.cxx
index fed3a83f161f..c3b8701fa6c8 100644
--- a/sc/source/ui/unoobj/notesuno.cxx
+++ b/sc/source/ui/unoobj/notesuno.cxx
@@ -68,6 +68,8 @@ ScAnnotationObj::ScAnnotationObj(ScDocShell* pDocSh, const ScAddress& rPos) :
ScAnnotationObj::~ScAnnotationObj()
{
+ SolarMutexGuard g;
+
if (pDocShell)
pDocShell->GetDocument().RemoveUnoObject(*this);