forked from AuroraMiddleware/gtk
x11/gl: Do not try to call MakeCurrent with a NULL context
This should not happen, but better safe than sorry. https://bugzilla.gnome.org/show_bug.cgi?id=746746
This commit is contained in:
parent
b899a78387
commit
85141bc503
@ -1212,6 +1212,12 @@ gdk_x11_display_make_gl_context_current (GdkDisplay *display,
|
||||
}
|
||||
|
||||
context_x11 = GDK_X11_GL_CONTEXT (context);
|
||||
if (context_x11->glx_context == NULL)
|
||||
{
|
||||
g_critical ("No GLX context associated to the GdkGLContext; you must "
|
||||
"call gdk_gl_context_realize() first.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
GDK_NOTE (OPENGL,
|
||||
g_print ("Making GLX context current to drawable %lu\n",
|
||||
|
Loading…
Reference in New Issue
Block a user