mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-13 09:15:36 +00:00
Don't do any processing internally if GL context creation failed
This commit is contained in:
@@ -586,6 +586,10 @@ __attribute__ ((visibility ("default")))
|
||||
GLXContext glXCreateContext(Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct)
|
||||
{
|
||||
GLXContext ret = OpenGLHook::glhooks.glXCreateContext_real(dpy, vis, shareList, direct);
|
||||
|
||||
// don't continue if context creation failed
|
||||
if(!ret)
|
||||
return ret;
|
||||
|
||||
GLInitParams init;
|
||||
|
||||
@@ -688,6 +692,10 @@ GLXContext glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config, GLXConte
|
||||
|
||||
GLXContext ret = OpenGLHook::glhooks.glXCreateContextAttribsARB_real(dpy, config, shareList, direct, attribs);
|
||||
|
||||
// don't continue if context creation failed
|
||||
if(!ret)
|
||||
return ret;
|
||||
|
||||
XVisualInfo *vis = OpenGLHook::glhooks.glXGetVisualFromFBConfig_real(dpy, config);
|
||||
|
||||
GLInitParams init;
|
||||
|
||||
@@ -386,8 +386,8 @@ class OpenGLHook : LibraryHook
|
||||
{
|
||||
HGLRC ret = glhooks.wglCreateContext_hook()(dc);
|
||||
|
||||
// don't recurse
|
||||
if(glhooks.m_CreatingContext)
|
||||
// don't recurse and don't continue if creation failed
|
||||
if(glhooks.m_CreatingContext || ret == NULL)
|
||||
return ret;
|
||||
|
||||
glhooks.m_CreatingContext = true;
|
||||
@@ -422,8 +422,8 @@ class OpenGLHook : LibraryHook
|
||||
{
|
||||
HGLRC ret = glhooks.wglCreateLayerContext_hook()(dc, iLayerPlane);
|
||||
|
||||
// don't recurse
|
||||
if(glhooks.m_CreatingContext)
|
||||
// don't recurse and don't continue if creation failed
|
||||
if(glhooks.m_CreatingContext || ret == NULL)
|
||||
return ret;
|
||||
|
||||
glhooks.m_CreatingContext = true;
|
||||
@@ -515,6 +515,10 @@ class OpenGLHook : LibraryHook
|
||||
|
||||
HGLRC ret = glhooks.wglCreateContextAttribsARB_realfunc(dc, hShareContext, attribs);
|
||||
|
||||
// don't continue if creation failed
|
||||
if(ret == NULL)
|
||||
return ret;
|
||||
|
||||
GLWindowingData data;
|
||||
data.DC = dc;
|
||||
data.wnd = WindowFromDC(dc);
|
||||
|
||||
Reference in New Issue
Block a user