summaryrefslogtreecommitdiff
path: root/svx/source/accessibility
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-18 11:05:20 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-18 15:01:31 +0200
commitaa3c054fe5d7b082532f1108f30a54bc4cdeb64c (patch)
tree3c22017dcc8eb556ca552068f040099a57fa4c6e /svx/source/accessibility
parentda9d85ae699b841a6d6616e6db9d9dbb23ed73c0 (diff)
Resolves: tdf#109282: a11y crash in use after dispose
calc, chart in tab 3 with a11y enabled, select chart switch to tab 1, crash cause mpParent has been deleted, IsDisposed is correctly set, but shape accesses parent anyway Change-Id: I6f57a798bfcc82eebb883291cec54e157ff5187b Reviewed-on: https://gerrit.libreoffice.org/43487 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/accessibility')
-rw-r--r--svx/source/accessibility/AccessibleShape.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index 4dc9ab0b6987..b2ff186ae7cb 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -407,7 +407,9 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
::osl::MutexGuard aGuard (maMutex);
Reference<XAccessibleStateSet> xStateSet;
- if (IsDisposed())
+ bool bDisposed = IsDisposed();
+
+ if (bDisposed)
{
// Return a minimal state set that only contains the DEFUNC state.
xStateSet = AccessibleContextBase::getAccessibleStateSet ();
@@ -458,7 +460,7 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
xStateSet.set( new ::utl::AccessibleStateSetHelper (*pStateSet));
}
}
- if (mpParent && mpParent->IsDocumentSelAll())
+ if (!bDisposed && mpParent && mpParent->IsDocumentSelAll())
{
::utl::AccessibleStateSetHelper* pStateSet =
static_cast< ::utl::AccessibleStateSetHelper*>(xStateSet.get());