mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-09 05:41:31 +00:00
Only re-hook all modules after LoadLibrary if the library loaded
* This fixes a problem where if some code is repeatedly doing LoadLibrary for a library that doesn't exist, we'll constantly re-hook everything pointlessly.
This commit is contained in:
1 parent
f2b2c6c5b9
commit
a998de110d
1 file changed
+2
-2
@@ -563,7 +563,7 @@ HMODULE WINAPI Hooked_LoadLibraryExA(LPCSTR lpLibFileName, HANDLE fileHandle, DW
|
||||
|
||||
DWORD err = GetLastError();
|
||||
|
||||
if(dohook)
|
||||
if(dohook && mod)
|
||||
HookAllModules();
|
||||
|
||||
SetLastError(err);
|
||||
@@ -589,7 +589,7 @@ HMODULE WINAPI Hooked_LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE fileHandle, D
|
||||
|
||||
DWORD err = GetLastError();
|
||||
|
||||
if(dohook)
|
||||
if(dohook && mod)
|
||||
HookAllModules();
|
||||
|
||||
SetLastError(err);
|
||||
|
||||
Reference in new issue
Block a user