kernel: An unavailable address for the PE file can cause ERROR_NOT_ENOUGH_MEMORY too.

This commit is contained in:
Alexandre Julliard 2006-09-09 23:14:26 +02:00
parent dc8c76ae3c
commit 33f047fe56

View File

@ -914,7 +914,9 @@ void __wine_kernel_init(void)
DWORD error = GetLastError();
/* if Win16/DOS format, or unavailable address, exec a new process with the proper setup */
if (error == ERROR_BAD_EXE_FORMAT || error == ERROR_INVALID_ADDRESS)
if (error == ERROR_BAD_EXE_FORMAT ||
error == ERROR_INVALID_ADDRESS ||
error == ERROR_NOT_ENOUGH_MEMORY)
{
if (!getenv("WINEPRELOADRESERVE")) exec_process( main_exe_name );
/* if we get back here, it failed */