[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sw/source
Michael Stahl
mstahl at redhat.com
Mon Jan 9 14:32:41 UTC 2017
sw/source/core/access/accfrmobj.cxx | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit 97b9f00e3a443f636416d047e7fdcb7a91fac937
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Jan 6 22:37:17 2017 +0100
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 at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx
index cf3e295..5b59078 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();
+ }
}
}
}
More information about the Libreoffice-commits
mailing list