diff options
author | Niklas Johansson <sleeping.pillow@gmail.com> | 2014-03-25 16:01:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-25 17:10:29 +0000 |
commit | e5d7a360e68b1725ee28abc5c76db5c4023dce88 (patch) | |
tree | 75452d76f5cd38095f2c18a1e525a20e08520791 /svx/source/accessibility | |
parent | 729f40f0359bcaa311c7d0067c84e7755286d261 (diff) |
Accessibility: Avoid immediate crash in Impress
When Accessibility is active Impress immediately crashes. We need to check that
mpParent isn't NULL before we try to call it's methods. This has been a
problem since at least commit 7ef4a5bd51c606c70661dd303ebd1eeaec0c3834.
I don't know if it is relevant to bring that back though.
Change-Id: Idaa1f30685205e3a62cec2a60a14791d798391a6
Reviewed-on: https://gerrit.libreoffice.org/8748
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.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index 61bc65eeca61..579c78530649 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -402,15 +402,18 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL throw (::com::sun::star::uno::RuntimeException, std::exception) { ::osl::MutexGuard aGuard (maMutex); + if (mpParent == NULL) + return uno::Reference<XAccessibleRelationSet>(); + ::utl::AccessibleRelationSetHelper* pRelationSet = new utl::AccessibleRelationSetHelper; - //this mxshape is the captioned shape, only for sw + //this mxshape is the captioned shape uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); aSequence[0] = mpParent->GetAccessibleCaption(mxShape); if(aSequence[0].get()) { pRelationSet->AddRelation( - AccessibleRelation( AccessibleRelationType::DESCRIBED_BY, aSequence ) ); + AccessibleRelation( AccessibleRelationType::DESCRIBED_BY, aSequence ) ); } return uno::Reference<XAccessibleRelationSet>(pRelationSet); } |