diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-01-06 22:37:17 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-01-06 23:02:43 +0100 |
commit | ade1d4c36053c2a7aed959e3dd09ebc1b8430ea8 (patch) | |
tree | fc2da1bdff19cf21f2270862452518e8c9db240c | |
parent | 2f1cf69153593ba61da672be72eb2ff4a5a7dad8 (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
-rw-r--r-- | sw/source/core/access/accfrmobj.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx index 3c6b3e5ab7f4..9c8d51520160 100644 --- a/sw/source/core/access/accfrmobj.cxx +++ b/sw/source/core/access/accfrmobj.cxx @@ -379,10 +379,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(); + } } } } |