evas/gl_x11: fix duplicated egl error check
authorDongyeon Kim <dy5.kim@samsung.com>
Mon, 2 Mar 2015 07:21:22 +0000 (16:21 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Mon, 2 Mar 2015 07:22:12 +0000 (16:22 +0900)
Summary:
When egl window surface creation fails, eglGetError() is called twice,
thus removing error state.

Reviewers: cedric, Hermet, jpeg

Reviewed By: jpeg

Subscribers: mer.kim, wonsik, cedric

Differential Revision: https://phab.enlightenment.org/D2064

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
src/modules/evas/engines/gl_x11/evas_x_main.c

index db8d70a..7cad2e6 100644 (file)
@@ -190,9 +190,10 @@ eng_window_new(Evas_Engine_Info_GL_X11 *info,
                                                NULL);
    if (gw->egl_surface[0] == EGL_NO_SURFACE)
      {
-        printf("surf creat fail! %x\n", eglGetError());
+        int err = eglGetError();
+        printf("surf creat fail! %x\n", err);
         ERR("eglCreateWindowSurface() fail for %#x. code=%#x",
-            (unsigned int)gw->win, eglGetError());
+            (unsigned int)gw->win, err);
         eng_window_free(gw);
         return NULL;
      }