evas: fix error checking of eglBindAPI.
authorMinkyoung Kim <mer.kim@samsung.com>
Tue, 17 Feb 2015 15:34:35 +0000 (16:34 +0100)
committerCedric BAIL <cedric@osg.samsung.com>
Tue, 17 Feb 2015 15:34:41 +0000 (16:34 +0100)
Summary: If eglGetError sequencially called, second eglGetError() doesn't give the information of real Error.

@fix

Reviewers: raster, jpeg, cedric, Hermet

Subscribers: cedric, spacegrapher, wonsik

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/modules/evas/engines/gl_x11/evas_x_main.c

index 0c96f5514f9742c270f6c4d4f902facea6c40746..db8d70ae7511a3338b4e990b22955870b1551b36 100644 (file)
@@ -175,8 +175,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);