Kaydet (Commit) 6045c38f authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

Avoid crash when no args specified

Change-Id: Id3d10566af674f02f3734f981e6b4b45b528ed92
üst 214fd01b
...@@ -467,7 +467,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) ...@@ -467,7 +467,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
{ {
const SfxItemSet* pArgs = rReq.GetArgs(); const SfxItemSet* pArgs = rReq.GetArgs();
const SfxStringItem* pItem = 0; const SfxStringItem* pItem = 0;
if (nSlot == SID_CHAR_DLG) if (pArgs && nSlot == SID_CHAR_DLG)
pItem = static_cast< const SfxStringItem* >(pArgs->GetItem(FN_PARAM_1, false, TYPE(SfxStringItem) ) ); pItem = static_cast< const SfxStringItem* >(pArgs->GetItem(FN_PARAM_1, false, TYPE(SfxStringItem) ) );
if( !pArgs || pItem ) if( !pArgs || pItem )
......
...@@ -299,7 +299,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) ...@@ -299,7 +299,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
{ {
const SfxItemSet* pArgs = rReq.GetArgs(); const SfxItemSet* pArgs = rReq.GetArgs();
const SfxStringItem* pItem = 0; const SfxStringItem* pItem = 0;
if (nSlot == SID_CHAR_DLG) if (pArgs && nSlot == SID_CHAR_DLG)
pItem = static_cast< const SfxStringItem* >(pArgs->GetItem(FN_PARAM_1, false, TYPE(SfxStringItem) ) ); pItem = static_cast< const SfxStringItem* >(pArgs->GetItem(FN_PARAM_1, false, TYPE(SfxStringItem) ) );
if( !pArgs || pItem ) if( !pArgs || pItem )
......
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