kernel: Fail more gracefully when loading a builtin exe didn't work.

This commit is contained in:
Alexandre Julliard 2006-01-24 11:05:11 +01:00
parent 6d32c42ced
commit a2a29e22a0
1 changed files with 3 additions and 2 deletions

View File

@ -1088,9 +1088,10 @@ void __wine_kernel_init(void)
if (!main_exe_file) /* no file handle -> Winelib app */
{
TRACE( "starting Winelib app %s\n", debugstr_w(main_exe_name) );
if (open_builtin_exe_file( main_exe_name, error, sizeof(error), 0, &file_exists ))
if (open_builtin_exe_file( main_exe_name, error, sizeof(error), 0, &file_exists ) &&
NtCurrentTeb()->Peb->ImageBaseAddress)
goto found;
MESSAGE( "wine: cannot open builtin library for %s: %s\n",
MESSAGE( "wine: cannot open builtin exe for %s: %s\n",
debugstr_w(main_exe_name), error );
ExitProcess(1);
}