evas: fix error checking of eglBindAPI. 41/47441/4
authorMinkyoung Kim <mer.kim@samsung.com>
Mon, 16 Mar 2015 01:58:04 +0000 (10:58 +0900)
committerDaeKwang Ryu <dkdk.ryu@samsung.com>
Wed, 16 Sep 2015 12:05:25 +0000 (21:05 +0900)
If eglGetError sequencially called, second eglGetError() doesn't give the information of real Error.

Change-Id: Ifcb677e0675768b1b1c79e5e1000bbd2ffc39eec

src/modules/evas/engines/gl_x11/evas_x_main.c

index cfb1dc8..55145ac 100644 (file)
@@ -182,8 +182,7 @@ eng_window_new(Evas_Engine_Info_GL_X11 *info,
         eng_window_free(gw);
         return NULL;
      }
-   eglBindAPI(EGL_OPENGL_ES_API);
-   if (eglGetError() != EGL_SUCCESS)
+   if (!eglBindAPI(EGL_OPENGL_ES_API))
      {
         ERR("eglBindAPI() fail. code=%#x", eglGetError());
         eng_window_free(gw);