From 85a343c24bfebe9e555312851ffe04f73a5094fa Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 24 Aug 2015 20:41:10 +0200 Subject: [PATCH] Speculative fix for bizarre crash where wglGetProcAddress_hook is NULL --- renderdoc/driver/gl/gl_hooks_win32.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/renderdoc/driver/gl/gl_hooks_win32.cpp b/renderdoc/driver/gl/gl_hooks_win32.cpp index 7bd995da5..6383d5366 100644 --- a/renderdoc/driver/gl/gl_hooks_win32.cpp +++ b/renderdoc/driver/gl/gl_hooks_win32.cpp @@ -346,6 +346,9 @@ class OpenGLHook : LibraryHook ret.isSRGB = true; + if(glhooks.wglGetProcAddress_hook() == NULL) + glhooks.wglGetProcAddress_hook.SetFuncPtr(Process::GetFunctionAddress(DLL_NAME, "wglGetProcAddress")); + if(glhooks.wglGetPixelFormatAttribivARB_realfunc == NULL) glhooks.wglGetProcAddress_hook()("wglGetPixelFormatAttribivARB");