From cf5059706e701fc4ea87026e1f736bc1d777df60 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 15 Sep 2016 10:09:32 +0200 Subject: [PATCH] Fix a crash if calling GetProcAddress for GetProcAddress (what?!) * Would also happen for LoadLibrary variants, but the crashdump I got was for GetProcAddress. --- renderdoc/os/win32/win32_hook.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderdoc/os/win32/win32_hook.cpp b/renderdoc/os/win32/win32_hook.cpp index a093ee431..89a9ecf2c 100644 --- a/renderdoc/os/win32/win32_hook.cpp +++ b/renderdoc/os/win32/win32_hook.cpp @@ -493,7 +493,7 @@ FARPROC WINAPI Hooked_GetProcAddress(HMODULE mod, LPCSTR func) if(found->origptr && *found->origptr == NULL) *found->origptr = (void *)GetProcAddress(mod, func); - if(*found->origptr == NULL) + if(found->origptr && *found->origptr == NULL) return NULL; return (FARPROC)found->hookptr;