summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();
+ }
}
}
}