Kaydet (Commit) 7ce76308 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#704759 Dereference after null check

Change-Id: I1f41d2bc43391175a4587f501f02775adc43bc8e
üst a0178305
......@@ -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);
......
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