Evas/WL: fix error checking of eglBindAPI. 60/52460/2
authorDaeKwang Ryu <dkdk.ryu@samsung.com>
Wed, 28 Oct 2015 06:06:40 +0000 (15:06 +0900)
committerDaeKwang Ryu <dkdk.ryu@samsung.com>
Fri, 4 Dec 2015 06:18:49 +0000 (15:18 +0900)
if eglGetError sequencially called, second eglGetError() doesn't give
the information of real Error.

Change-Id: I9acd303d5550fe896b19b0a50e071e89f2185fac

src/modules/evas/engines/wayland_egl/evas_wl_main.c

index a4ca96d..02bc6a5 100644 (file)
@@ -84,8 +84,7 @@ eng_window_new(Evas *evas, Evas_Engine_Info_Wayland_Egl *einfo, int w, int h, Re
         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);