diff options
-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); } |