summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-05-07 11:49:23 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-05-07 15:47:25 +0100
commit6c7d2e39e752980b08b0b87427dbfc15f89ae079 (patch)
treee021a8aab782102b7df9862d4b4fb4481016d791 /sd/source
parentd386da8bb3e39e052e83a3aa166d1f1a305171f7 (diff)
coverity#735834 Explicit null dereferenced
Change-Id: I806058555f58a3f03153372e581fae6d8cb0670b
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/dlg/animobjs.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 7313b9ce4e06..00303482441d 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -1276,11 +1276,13 @@ void AnimationControllerItem::StateChanged( sal_uInt16 nSId,
if( eState >= SFX_ITEM_AVAILABLE && nSId == SID_ANIMATOR_STATE )
{
const SfxUInt16Item* pStateItem = PTR_CAST( SfxUInt16Item, pItem );
- DBG_ASSERT( pStateItem, "SfxUInt16Item expected");
- sal_uInt16 nState = pStateItem->GetValue();
-
- pAnimationWin->aBtnGetOneObject.Enable( nState & 1 );
- pAnimationWin->aBtnGetAllObjects.Enable( nState & 2 );
+ assert(pStateItem); //SfxUInt16Item expected
+ if (pStateItem)
+ {
+ sal_uInt16 nState = pStateItem->GetValue();
+ pAnimationWin->aBtnGetOneObject.Enable( nState & 1 );
+ pAnimationWin->aBtnGetAllObjects.Enable( nState & 2 );
+ }
}
}