summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-17 15:18:10 +0200
committerAndras Timar <andras.timar@collabora.com>2015-08-06 12:23:05 +0200
commit91fb34e5bb8616e4fe7d30786d59c5383d8aa4e1 (patch)
treec4d1a99e8637df919be19ee9eb253bc402f3d750 /svx
parent999c01c133640d366d1ab28e5686b36cb2976fc4 (diff)
Some missing SolarMutexGuard around VclPtr acquire/release
At least OutputDevice::acquire/release use a plain unguarded int and ++, --, so apparently rely on the SolarMutex being locked whenever they are called. Fixed those places that caused "make check" to fail for me when temporarily adding DBG_TESTSOLARMUTEX() to OutputDevice::acquire/release. (A recurring pattern is that a class fails to ensure the SolarMutex is locked around the destruction of non-null VclPtr members.) Change-Id: I77cba6f3908f2de1b516ce28f1c3c43b3f57a9c5 (cherry picked from commit 8e1ad966262932516b3368d9b5c44becb29524d4) Signed-off-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/accessibility/AccessibleShapeTreeInfo.cxx4
-rw-r--r--svx/source/fmcomp/fmgridif.cxx2
2 files changed, 4 insertions, 2 deletions
diff --git a/svx/source/accessibility/AccessibleShapeTreeInfo.cxx b/svx/source/accessibility/AccessibleShapeTreeInfo.cxx
index 416dfa63a273..b141ce88d64a 100644
--- a/svx/source/accessibility/AccessibleShapeTreeInfo.cxx
+++ b/svx/source/accessibility/AccessibleShapeTreeInfo.cxx
@@ -19,6 +19,7 @@
#include <svx/AccessibleShapeTreeInfo.hxx>
+#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
using namespace ::com::sun::star;
@@ -71,7 +72,8 @@ AccessibleShapeTreeInfo& AccessibleShapeTreeInfo::operator= (const AccessibleSha
AccessibleShapeTreeInfo::~AccessibleShapeTreeInfo()
{
- //empty
+ SolarMutexGuard g;
+ mpWindow.reset();
}
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index e78f3a85c910..85f85134a6da 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -2633,10 +2633,10 @@ void FmXGridPeer::resetted(const EventObject& rEvent) throw( RuntimeException, s
{
if (m_xColumns == rEvent.Source)
{ // my model was reset -> refresh the grid content
+ SolarMutexGuard aGuard;
VclPtr< FmGridControl > pGrid = GetAs< FmGridControl >();
if (!pGrid)
return;
- SolarMutexGuard aGuard;
pGrid->resetCurrentRow();
}
// if the cursor fired a reset event we seem to be on the insert row