diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-01-06 22:37:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-09 14:32:16 +0000 |
commit | 97b9f00e3a443f636416d047e7fdcb7a91fac937 (patch) | |
tree | e3c33aa8efb64a65249be898818ed0a9f775d68a /sw | |
parent | 68c05e360a65a3984d3839f563daa34e2cce0b14 (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/32802
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-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 cf3e29520926..5b590787473a 100644 --- a/sw/source/core/access/accfrmobj.cxx +++ b/sw/source/core/access/accfrmobj.cxx @@ -367,10 +367,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(); + } } } } |