summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-01-06 22:37:17 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-01-09 14:31:29 +0000
commit017991fac36433fb909de83cad63b5ed98b71acf (patch)
treecaf70fbc774476b0642de63f964ae620c6ca253b
parent9fa92265bbbb95958410b4ca7d790e8e3dd27345 (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>
-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 c6986d9d9ac5..4a093bdd2d0c 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();
+ }
}
}
}