Commit 21204f57 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

kernel32: LOADPARAMS16->showCmd can be NULL, do not crash in that case.

parent 661b01f9
......@@ -1193,7 +1193,7 @@ HINSTANCE16 WINAPI LoadModule16( LPCSTR name, LPVOID paramBlock )
HMODULE16 hModule;
NE_MODULE *pModule;
LPSTR cmdline;
WORD cmdShow;
WORD cmdShow = 1; /* SW_SHOWNORMAL but we don't want to include winuser.h here */
if (name == NULL) return 0;
......@@ -1235,7 +1235,8 @@ HINSTANCE16 WINAPI LoadModule16( LPCSTR name, LPVOID paramBlock )
* information.
*/
params = (LOADPARAMS16 *)paramBlock;
cmdShow = ((WORD *)MapSL(params->showCmd))[1];
if (params->showCmd)
cmdShow = ((WORD *)MapSL( params->showCmd ))[1];
cmdline = MapSL( params->cmdLine );
return NE_CreateThread( pModule, cmdShow, cmdline );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment