don't crash if one of GetAllCommands() parameters is NULL (coverity checker CID 11)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1400,13 +1400,17 @@ size_t wxFileTypeImpl::GetAllCommands(wxArrayString *verbs,
|
|||||||
count++;
|
count++;
|
||||||
if ( vrb.IsSameAs(wxT("open")))
|
if ( vrb.IsSameAs(wxT("open")))
|
||||||
{
|
{
|
||||||
verbs->Insert(vrb, 0u);
|
if ( verbs )
|
||||||
commands ->Insert(cmd, 0u);
|
verbs->Insert(vrb, 0u);
|
||||||
|
if ( commands )
|
||||||
|
commands ->Insert(cmd, 0u);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
verbs->Add(vrb);
|
if ( verbs )
|
||||||
commands->Add(cmd);
|
verbs->Add(vrb);
|
||||||
|
if ( commands )
|
||||||
|
commands->Add(cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user