diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-07 11:49:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-07 15:47:25 +0100 |
commit | 6c7d2e39e752980b08b0b87427dbfc15f89ae079 (patch) | |
tree | e021a8aab782102b7df9862d4b4fb4481016d791 /sd | |
parent | d386da8bb3e39e052e83a3aa166d1f1a305171f7 (diff) |
coverity#735834 Explicit null dereferenced
Change-Id: I806058555f58a3f03153372e581fae6d8cb0670b
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/animobjs.cxx | 12 |
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 ); + } } } |