diff options
-rw-r--r-- | sw/source/core/frmedt/fecopy.cxx | 9 |
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 ); } |