Kaydet (Commit) 70f90c80 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#735668 Dereference after null check

Change-Id: Ie7fbc0508ab30c35c52508869367f553b75553e0
üst 96926d2f
...@@ -933,6 +933,7 @@ void SfxToolBoxControl::StateChanged ...@@ -933,6 +933,7 @@ void SfxToolBoxControl::StateChanged
switch ( eState ) switch ( eState )
{ {
case SFX_ITEM_AVAILABLE: case SFX_ITEM_AVAILABLE:
if ( pState )
{ {
if ( pState->ISA(SfxBoolItem) ) if ( pState->ISA(SfxBoolItem) )
{ {
...@@ -951,14 +952,15 @@ void SfxToolBoxControl::StateChanged ...@@ -951,14 +952,15 @@ void SfxToolBoxControl::StateChanged
} }
else if ( pImpl->bShowString && pState->ISA(SfxStringItem) ) else if ( pImpl->bShowString && pState->ISA(SfxStringItem) )
pImpl->pBox->SetItemText(nId, ((const SfxStringItem*)pState)->GetValue() ); pImpl->pBox->SetItemText(nId, ((const SfxStringItem*)pState)->GetValue() );
break;
} }
break;
case SFX_ITEM_DONTCARE: case SFX_ITEM_DONTCARE:
{ {
eTri = TRISTATE_INDET; eTri = TRISTATE_INDET;
nItemBits |= TIB_CHECKABLE; nItemBits |= TIB_CHECKABLE;
} }
break;
} }
pImpl->pBox->SetItemState( GetId(), eTri ); pImpl->pBox->SetItemState( GetId(), eTri );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment