diff options
-rw-r--r-- | sw/source/core/layout/flyincnt.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx index 3f0bc43764c1..14e0ad9698c8 100644 --- a/sw/source/core/layout/flyincnt.cxx +++ b/sw/source/core/layout/flyincnt.cxx @@ -84,12 +84,13 @@ void SwFlyInCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) { bool bCallPrepare = false; sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0; - if( RES_ATTRSET_CHG == nWhich ) + if (RES_ATTRSET_CHG == nWhich && pNew) { - if( SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()-> - GetItemState( RES_SURROUND, false ) || + if(pOld && + (SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()-> + GetItemState(RES_SURROUND, false) || SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()-> - GetItemState( RES_FRMMACRO, false ) ) + GetItemState(RES_FRMMACRO, false)) ) { SwAttrSetChg aOld( *(SwAttrSetChg*)pOld ); SwAttrSetChg aNew( *(SwAttrSetChg*)pNew ); |