fixed argv[0] out of bounds error (argc can be 0 when wxEntry is manually called in a plugin environment for example)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Dimitri Schoolwerth
2005-10-11 15:05:03 +00:00
parent 2b053ae90a
commit b04ada921f

View File

@@ -241,7 +241,8 @@ void wxCmdLineParserData::SetArguments(const wxString& cmdLine)
{
m_arguments.clear();
m_arguments.push_back(wxTheApp ? wxTheApp->argv[0] : _T(""));
m_arguments.push_back(
(wxTheApp && wxTheApp->argc > 0) ? wxTheApp->argv[0] : wxEmptyString);
wxArrayString args = wxCmdLineParser::ConvertStringToArgs(cmdLine);