evas: fix error checking of eglBindAPI.

Summary:
if eglGetError sequencially called, second eglGetError() doesn't give
the information of real Error.

Reviewers: jpeg, spacegrapher, cedric

Reviewed By: cedric

Subscribers: wonsik, scholb.kim, cedric, dkdk

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Joogab Yun 2015-11-10 14:42:58 -08:00 committed by Cedric BAIL
parent 33809c969c
commit c20457e33d
1 changed files with 1 additions and 2 deletions

View File

@ -83,8 +83,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);