summaryrefslogtreecommitdiffstats
path: root/sw/source/core/txtnode/atrflyin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/txtnode/atrflyin.cxx')
-rw-r--r--sw/source/core/txtnode/atrflyin.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx
index 28eb7b38e5..fbefb76fa8 100644
--- a/sw/source/core/txtnode/atrflyin.cxx
+++ b/sw/source/core/txtnode/atrflyin.cxx
@@ -197,7 +197,8 @@ void SwTextFlyCnt::SetAnchor( const SwTextNode *pNode )
{
if (SdrObject const*const pObj = pFormat->FindSdrObject())
{ // tdf#123259 disconnect with *old* anchor position
- static_cast<SwDrawContact*>(::GetUserCall(pObj))->DisconnectFromLayout(false);
+ if (SwDrawContact* pContact = static_cast<SwDrawContact*>(::GetUserCall( pObj )))
+ pContact->DisconnectFromLayout(false);
}
}
pFormat->SetFormatAttr( aAnchor ); // only set the anchor