From 7ce763089b221cd603bba70054e6efb5bdeecbf4 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 26 Jul 2014 21:13:21 +0100 Subject: coverity#704759 Dereference after null check Change-Id: I1f41d2bc43391175a4587f501f02775adc43bc8e --- sd/source/ui/func/futempl.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index 8ff19b53d5c9..303e0b34aef9 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -154,7 +154,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) } } - if (pArgs->GetItemState(nSId) == SFX_ITEM_SET) + if (pArgs && pArgs->GetItemState(nSId) == SFX_ITEM_SET) aStyleName = ( ( (const SfxStringItem &) pArgs->Get( nSId ) ).GetValue() ); } } @@ -171,7 +171,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) } pStyleSheet = &pSSPool->Make( aStyleName, (SfxStyleFamily) nFamily, SFXSTYLEBIT_USERDEF ); - if (pArgs->GetItemState(SID_STYLE_REFERENCE) == SFX_ITEM_ON) + if (pArgs && pArgs->GetItemState(SID_STYLE_REFERENCE) == SFX_ITEM_ON) { OUString aParentName(((const SfxStringItem&) pArgs->Get(SID_STYLE_REFERENCE)).GetValue()); pStyleSheet->SetParent(aParentName); -- cgit