avoid reading unallocated memory when argc == 0 (closes #22633)
This commit is contained in:
parent
7fe04f1dca
commit
4cc93db9b3
|
@ -35,7 +35,8 @@ Py_FrozenMain(int argc, char **argv)
|
|||
#ifdef MS_WINDOWS
|
||||
PyInitFrozenExtensions();
|
||||
#endif /* MS_WINDOWS */
|
||||
Py_SetProgramName(argv[0]);
|
||||
if (argc >= 1)
|
||||
Py_SetProgramName(argv[0]);
|
||||
Py_Initialize();
|
||||
#ifdef MS_WINDOWS
|
||||
PyWinFreeze_ExeInit();
|
||||
|
|
Loading…
Reference in New Issue