Don't try and hook OpenGL functions if the dll isn't even loaded on win32

This commit is contained in:
baldurk
2014-06-16 00:00:00 +01:00
parent 9553f66278
commit a9df1e4ef2
+6
View File
@@ -189,6 +189,12 @@ class OpenGLHook : LibraryHook
if(!m_EnabledHooks)
return false;
if(GetModuleHandleA(DLL_NAME) == NULL)
{
RDCWARN("Failed to load %s - not inserting OpenGL hooks.", DLL_NAME);
return false;
}
bool success = SetupHooks(GL);