X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/85149efad7fc85798de59e8a680616aa5ad85ffb..68b4e4cff00ea79be15867ecf640d451584f3dd3:/src/common/init.cpp?ds=inline diff --git a/src/common/init.cpp b/src/common/init.cpp index b27736deac..d126e10b8d 100644 --- a/src/common/init.cpp +++ b/src/common/init.cpp @@ -179,7 +179,8 @@ static void ConvertArgsToUnicode(int argc, char **argv) gs_initData.argv = new wchar_t *[argc + 1]; for ( int i = 0; i < argc; i++ ) { - gs_initData.argv[i] = wxStrdup(wxConvLocal.cMB2WX(argv[i])); + wxWCharBuffer buf(wxConvLocal.cMB2WX(argv[i])); + gs_initData.argv[i] = buf ? wxStrdup(buf) : NULL; } gs_initData.argc = argc;