summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-05-07 12:09:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-05-07 15:47:26 +0100
commitf36614bb7892af1c0aabe49c95bf3824a746e6f9 (patch)
treeb45d05b13524fe66f942ae8651d73dfe04168b7d
parent88613ffedac1211c76c73ca9a979cf920fbd3c52 (diff)
coverity#735860 Explicit null dereferenced
Change-Id: I2c031ffc70e7ddacde52f120513f9dd5ff1a4c50
-rw-r--r--svx/source/dialog/imapdlg.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index d6f2dad2f112..f06240786895 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -86,11 +86,12 @@ void SvxIMapDlgItem::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/,
if ( ( nSID == SID_IMAP_EXEC ) && pItem )
{
const SfxBoolItem* pStateItem = PTR_CAST( SfxBoolItem, pItem );
-
- DBG_ASSERT( pStateItem || pItem == 0, "SfxBoolItem expected");
-
- // Disable Float if possible
- rIMap.SetExecState( !pStateItem->GetValue() );
+ assert(pStateItem); //SfxBoolItem expected
+ if (pStateItem)
+ {
+ // Disable Float if possible
+ rIMap.SetExecState( !pStateItem->GetValue() );
+ }
}
}