Evas (gl_x11): We cannot call eglMakeCurrent if we have already called
authordevilhorns <devilhorns@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 12 Jan 2012 06:06:07 +0000 (06:06 +0000)
committerdevilhorns <devilhorns@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 12 Jan 2012 06:06:07 +0000 (06:06 +0000)
eglTerminate prior (eg: eglTerminate was in the wrong place here).

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@67119 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/modules/engines/gl_x11/evas_x_main.c

index 323c976..72b60f2 100644 (file)
@@ -534,10 +534,10 @@ eng_window_free(Evas_GL_X11_Window *gw)
    if (ref == 0)
      {
         if (context) eglDestroyContext(gw->egl_disp, context);
-        eglTerminate(gw->egl_disp);
         context = EGL_NO_CONTEXT;
      }
    eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+   if (ref == 0) eglTerminate(gw->egl_disp);
 #else
    if (gw->glxwin) glXDestroyWindow(gw->disp, gw->glxwin);
    if (ref == 0)