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 7ef4a5bd51
.
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>
This commit is contained in:
committed by
Caolán McNamara
parent
729f40f035
commit
e5d7a360e6
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user