summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unodraw.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-11-09 18:56:17 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-11-09 19:04:32 +0100
commitffdc5db260b7c17c47109f707b3664a3f3caafaa (patch)
treeef804335eb959645b118f506360b89e78d7e0370 /sw/source/core/unocore/unodraw.cxx
parent37039fde1187c2e71bdde6e7fafd23c6ae8a871e (diff)
fix a set of race conditions in the writer uno wrappers
- whenever SwClients are added or removed, the SolarMutex should be locked - locking the mutex there would be a performance killer - thus only DBG_TESTSOLARMUTEX() and fixing the fallout on DBG_UTL builds Change-Id: I3b10b9a01c40fbe68d15ce6e9c5c74db34eb1eb6 Reviewed-on: https://gerrit.libreoffice.org/19856
Diffstat (limited to 'sw/source/core/unocore/unodraw.cxx')
-rw-r--r--sw/source/core/unocore/unodraw.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 1062514a90de..fb99025e305d 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1006,12 +1006,15 @@ void SwXShape::AddExistingShapeToFormat( SdrObject& _rObj )
SwXShape::~SwXShape()
{
+ SolarMutexGuard aGuard;
if (xShapeAgg.is())
{
uno::Reference< uno::XInterface > xRef;
xShapeAgg->setDelegator(xRef);
}
delete pImpl;
+ if(GetRegisteredIn())
+ GetRegisteredIn()->Remove(this);
}
uno::Any SwXShape::queryInterface( const uno::Type& aType ) throw( uno::RuntimeException, std::exception )