summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-05-07 11:54:07 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-05-07 15:47:26 +0100
commit5d5d773fc716107eb0abdd457d500e0c53e4b450 (patch)
tree58644540ad992fbc213cb8893baa5eabf0564f19 /sfx2
parent5818415ded1685b7e635f2d759d9ac1b0b3cb27b (diff)
coverity#735848 Explicit null dereferenced
Change-Id: I9fb6da4d448923fd5b8822a72d6945a0c0b5f40d
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/tplcitem.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx
index 33effd94397f..3ed5449d01eb 100644
--- a/sfx2/source/dialog/tplcitem.cxx
+++ b/sfx2/source/dialog/tplcitem.cxx
@@ -103,8 +103,11 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta
else if( eState == SFX_ITEM_AVAILABLE )
{
const SfxBoolItem *pStateItem = PTR_CAST(SfxBoolItem, pItem);
- DBG_ASSERT(pStateItem != 0, "BoolItem expected");
- nWaterCanState = pStateItem->GetValue() ? 1 : 0;
+ assert(pStateItem); //BoolItem expected
+ if (pStateItem)
+ nWaterCanState = pStateItem->GetValue() ? 1 : 0;
+ else
+ nWaterCanState = 0xff;
}
//not necessary if the last event is still on the way
if(!nUserEventId)