summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-01-06 22:37:17 +0100
committerAndras Timar <andras.timar@collabora.com>2017-02-08 11:56:05 +0100
commit19a1bfbd30a7958eaf2b7c62468ba43f4c0f0afc (patch)
tree986c802da0ddeccdd6633db3c8e5e37583ca4f75 /sw
parent2f8fe9b75f84d2c3dd3270ea1d3d7bdca2be74ca (diff)
tdf#105009 sw: fix a11y crash when removing drawing object
SwFrame::RemoveDrawObj() calls SwAnchoredObject::ChgAnchorFrame(0) so the SwAnchoredDrawObj has no anchor frame later when SwAccessibleMap::InvalidateCursorPosition() asks for the parent. (regression from 76c549eb01dcb7b5bf28a271ce00e386f3d388ba) Change-Id: Id55cb5fc41a4e37e863498265d1565e1621d508e (cherry picked from commit ade1d4c36053c2a7aed959e3dd09ebc1b8430ea8) Reviewed-on: https://gerrit.libreoffice.org/32803 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 017991fac36433fb909de83cad63b5ed98b71acf)
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/access/accfrmobj.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx
index cbd7b518e486..5054a0941553 100644
--- a/sw/source/core/access/accfrmobj.cxx
+++ b/sw/source/core/access/accfrmobj.cxx
@@ -368,10 +368,14 @@ const SwFrame* SwAccessibleChild::GetParent( const bool bInPagePreview ) const
else
{
// In any other case the parent is the root frm
- if( bInPagePreview )
- pParent = pContact->GetAnchorFrame()->FindPageFrame();
- else
- pParent = pContact->GetAnchorFrame()->getRootFrame();
+ SwFrame const*const pAnchor(pContact->GetAnchorFrame());
+ if (pAnchor) // null if object removed from layout
+ {
+ if (bInPagePreview)
+ pParent = pAnchor->FindPageFrame();
+ else
+ pParent = pAnchor->getRootFrame();
+ }
}
}
}