mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
Both GetModuleHandleA and GetModuleHandleW need to handle NULL module name
svn path=/trunk/; revision=1560
This commit is contained in:
parent
42d7089e72
commit
207393f045
1 changed files with 3 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: ldr.c,v 1.9 2000/09/01 17:09:19 ekohl Exp $
|
||||
/* $Id: ldr.c,v 1.10 2001/01/24 04:41:58 phreak Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT : ReactOS user mode libraries
|
||||
|
@ -303,6 +303,8 @@ GetModuleHandleA ( LPCSTR lpModuleName )
|
|||
PVOID BaseAddress;
|
||||
NTSTATUS Status;
|
||||
|
||||
if (lpModuleName == NULL)
|
||||
return ((HMODULE)NtCurrentPeb()->ImageBaseAddress);
|
||||
RtlInitAnsiString (&ModuleName,
|
||||
(LPSTR)lpModuleName);
|
||||
|
||||
|
|
Loading…
Reference in a new issue