Commit 85141bc5 authored by Emmanuele Bassi's avatar Emmanuele Bassi

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
parent b899a783
......@@ -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",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment