summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2018-06-15 01:05:09 +0200
committerAndras Timar <andras.timar@collabora.com>2018-06-27 06:40:31 +0200
commit6814f2c4940246723c7f4c54b7ddf60455550fc8 (patch)
tree8cc5f3b72ac210275c04f5a8eb0d6ba8501b03a5 /sw/source/core
parent9e1b2e9fdf5dbb93bd59c90baba8fc6c6820c300 (diff)
tdf#117723: nullcheck the ContentAnchor before deref
Change-Id: I4043efc204c8e3af8463ecd325313c99a9d61128 Reviewed-on: https://gerrit.libreoffice.org/55839 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org> Tested-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org> (cherry picked from commit d8142da066b6ee80444694e0eb6b0da9375a89c7) Reviewed-on: https://gerrit.libreoffice.org/55953 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit b1d679a1b06de087fe2a1af079e0c6c46473c0e3)
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/layout/frmtool.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 73683a400219..65ebe3158f56 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1087,8 +1087,9 @@ void AppendAllObjs(const SwFrameFormats* pTable, const SwFrame* pSib)
// frames nor objects which are anchored to character bounds.
if ((rAnch.GetAnchorId() != RndStdIds::FLY_AT_PAGE) && (rAnch.GetAnchorId() != RndStdIds::FLY_AS_CHAR))
{
+ auto pContentAnchor = rAnch.GetContentAnchor();
// formats in header/footer have no dependencies
- if(pFormat->GetDoc()->IsInHeaderFooter(rAnch.GetContentAnchor()->nNode))
+ if(pContentAnchor && pFormat->GetDoc()->IsInHeaderFooter(pContentAnchor->nNode))
pFormat->MakeFrames();
else
vFormatsToConnect.push_back(pFormat);