v2: fix GetModuleHandleExA rather than GetMoculdHandleA
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernelbase/loader.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/kernelbase/loader.c b/dlls/kernelbase/loader.c index 145d721bc26..4471d83dd24 100644 --- a/dlls/kernelbase/loader.c +++ b/dlls/kernelbase/loader.c @@ -355,7 +355,11 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetModuleHandleExA( DWORD flags, LPCSTR name, HMOD if (!name || (flags & GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS)) return GetModuleHandleExW( flags, (LPCWSTR)name, module );
- if (!(nameW = file_name_AtoW( name, FALSE ))) return FALSE; + if (!(nameW = file_name_AtoW( name, FALSE ))) + { + if (module) *module = NULL; + return FALSE; + } return GetModuleHandleExW( flags, nameW, module ); }