Register library hook even if callback is NULL. Refs #1040

This commit is contained in:
baldurk
2018-07-12 15:17:51 +01:00
parent fd5612e30a
commit 64006a856c
+4 -4
View File
@@ -176,13 +176,13 @@ void LibraryHooks::RegisterFunctionHook(const char *libraryName, const FunctionH
void LibraryHooks::RegisterLibraryHook(char const *name, FunctionLoadCallback cb)
{
if(cb == NULL)
return;
SCOPED_LOCK(libLock);
if(std::find(libraryHooks.begin(), libraryHooks.end(), name) == libraryHooks.end())
libraryHooks.push_back(name);
libraryCallbacks[name].push_back(cb);
if(cb)
libraryCallbacks[name].push_back(cb);
}
void LibraryHooks::IgnoreLibrary(const char *libraryName)