[gtk+/gtk-3-16] x11/gl: Do not try to call MakeCurrent with a NULL context
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-16] x11/gl: Do not try to call MakeCurrent with a NULL context
- Date: Fri, 27 Mar 2015 11:38:36 +0000 (UTC)
commit 732671f6392618c43b850a2b188f4e2fb86dde5c
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Mar 25 15:18:44 2015 +0000
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
gdk/x11/gdkglcontext-x11.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gdk/x11/gdkglcontext-x11.c b/gdk/x11/gdkglcontext-x11.c
index 8beae33..d6126fc 100644
--- a/gdk/x11/gdkglcontext-x11.c
+++ b/gdk/x11/gdkglcontext-x11.c
@@ -1214,6 +1214,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",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]