diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-20 14:33:55 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-20 15:38:41 +0000 |
commit | 70f90c80e3aa8936558f25d9be742e13e7c49e2d (patch) | |
tree | 95b748b6195d9642ec9f90f455dca214f441126a /sfx2 | |
parent | 96926d2f2f90ad8b0aadbc0f5e915abbce6a2518 (diff) |
coverity#735668 Dereference after null check
Change-Id: Ie7fbc0508ab30c35c52508869367f553b75553e0
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 9e30206ee03f..866a3bc601d0 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -933,6 +933,7 @@ void SfxToolBoxControl::StateChanged switch ( eState ) { case SFX_ITEM_AVAILABLE: + if ( pState ) { if ( pState->ISA(SfxBoolItem) ) { @@ -951,14 +952,15 @@ void SfxToolBoxControl::StateChanged } else if ( pImpl->bShowString && pState->ISA(SfxStringItem) ) pImpl->pBox->SetItemText(nId, ((const SfxStringItem*)pState)->GetValue() ); - break; } + break; case SFX_ITEM_DONTCARE: { eTri = TRISTATE_INDET; nItemBits |= TIB_CHECKABLE; } + break; } pImpl->pBox->SetItemState( GetId(), eTri ); |