mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-15 16:29:16 +01:00
[util] Return null if HMODULE is nullptr in GetProcAddress compat
dlsym with NULL will try to find the symbol from anything currently loaded.
This commit is contained in:
parent
4fc5ba66ed
commit
b05ae33273
@ -16,6 +16,9 @@ inline void FreeLibrary(HMODULE module) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline void* GetProcAddress(HMODULE module, LPCSTR lpProcName) {
|
inline void* GetProcAddress(HMODULE module, LPCSTR lpProcName) {
|
||||||
|
if (!module)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
return dlsym(module, lpProcName);
|
return dlsym(module, lpProcName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user