evas/gl_x11: fix duplicated egl error check

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>
This commit is contained in:
Dongyeon Kim 2015-03-02 16:21:22 +09:00 committed by Jean-Philippe Andre
parent de797bbd3b
commit 80b21a7d3f
1 changed files with 3 additions and 2 deletions

View 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;
}