LoadResource crashed with NULL hModule

svn path=/trunk/; revision=4383
This commit is contained in:
Gunnar Dalsnes 2003-03-21 00:20:41 +00:00
parent 5b0769c317
commit ed69e0431b

View file

@ -1,4 +1,4 @@
/* $Id: res.c,v 1.12 2003/01/15 21:24:35 chorns Exp $
/* $Id: res.c,v 1.13 2003/03/21 00:20:41 gdalsnes Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT : ReactOS user mode libraries
@ -174,6 +174,11 @@ LoadResource (
NTSTATUS Status;
PVOID Data;
if (hModule == NULL)
{
hModule = GetModuleHandle(NULL);
}
Status = LdrAccessResource (hModule, hResInfo, &Data, NULL);
if (!NT_SUCCESS(Status))
{