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:
Emmanuele Bassi 2015-03-25 15:18:44 +00:00
parent b899a78387
commit 85141bc503

View File

@ -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",