summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-05-23 16:47:02 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-05-23 20:37:33 +0100
commit5ff1c499d45789cb1af29cc7ba8c0139c7c3b77a (patch)
treef7248b3ad576fca5ee6c358f8115b6bc64fc97f6 /sw
parent40c77417d18fadebe59b2e1b2e71cadbfc06bba6 (diff)
coverity#1213245 Dereference null return value
Change-Id: I53dc316ff15ef23a79774d4894aa0940622e1311
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/frmedt/fecopy.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 9bf9f4fb0520..f24866689a04 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -942,9 +942,12 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames )
SwPosition* pPos = PCURCRSR->GetPoint();
// allow shapes (no controls) in header/footer
if( RES_DRAWFRMFMT == rCpyFmt.Which() &&
- GetDoc()->IsInHeaderFooter( pPos->nNode ) &&
- CheckControlLayer( rCpyFmt.FindSdrObject() ) )
- continue;
+ GetDoc()->IsInHeaderFooter( pPos->nNode ) )
+ {
+ const SdrObject *pCpyObj = rCpyFmt.FindSdrObject();
+ if (pCpyObj && CheckControlLayer(pCpyObj))
+ continue;
+ }
aAnchor.SetAnchor( pPos );
}