mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +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:
@@ -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