Fixes Bug #2191,incorrect test for egl_context validity
authorGabriel Jacobo <gabomdq@gmail.com>
Thu, 31 Oct 2013 10:02:21 -0300
changeset 7896 0bca3fe7c03f
parent 7895 a9d1c47bb1aa
child 7897 622d75108e60
Fixes Bug #2191,incorrect test for egl_context validity Thanks David Binderman!
src/video/SDL_egl.c
--- a/src/video/SDL_egl.c	Wed Oct 30 16:39:35 2013 -0400
+++ b/src/video/SDL_egl.c	Thu Oct 31 10:02:21 2013 -0300
@@ -394,7 +394,7 @@
         return;
     }
     
-    if (!egl_context && egl_context != EGL_NO_CONTEXT) {
+    if (egl_context != NULL && egl_context != EGL_NO_CONTEXT) {
         SDL_EGL_MakeCurrent(_this, NULL, NULL);
         _this->egl_data->eglDestroyContext(_this->egl_data->egl_display, egl_context);
     }