diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2019-07-18 18:53:26 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2019-07-18 19:09:09 +0100 |
commit | 4840e0d73db48ad12b8d175c45c1bf2f303ebc26 (patch) | |
tree | 15d99e41dddd92cb95600f955d4f7a21c3d55fa8 | |
parent | 622ac52f35e1695be62040d6c11011107efb8812 (diff) | |
download | gtk+-wip/ebassi/gdk-egl-x11-v2.tar.gz |
Unset the current EGL context if we're disposing itwip/ebassi/gdk-egl-x11-v2
The condition of the check should be reversed: if the context in the
process of being disposed is the currently set one then we should unset
it.
-rw-r--r-- | gdk/x11/gdkglcontext-x11-eglx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdk/x11/gdkglcontext-x11-eglx.c b/gdk/x11/gdkglcontext-x11-eglx.c index ad9b61378a..dd369c0831 100644 --- a/gdk/x11/gdkglcontext-x11-eglx.c +++ b/gdk/x11/gdkglcontext-x11-eglx.c @@ -554,7 +554,8 @@ gdk_x11_gl_context_dispose (GObject *gobject) GdkGLContext *context = GDK_GL_CONTEXT (gobject); GdkDisplay *display = gdk_gl_context_get_display (context); - if (eglGetCurrentContext () != context_x11->egl_context) + /* Unset the current context if we're disposing it */ + if (eglGetCurrentContext () == context_x11->egl_context) eglMakeCurrent (gdk_x11_display_get_egl_display (display), EGL_NO_SURFACE, EGL_NO_SURFACE, |