From 80b21a7d3f6960e07345f7ec96877995a4e10905 Mon Sep 17 00:00:00 2001 From: Dongyeon Kim Date: Mon, 2 Mar 2015 16:21:22 +0900 Subject: [PATCH] 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 --- src/modules/evas/engines/gl_x11/evas_x_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/evas/engines/gl_x11/evas_x_main.c b/src/modules/evas/engines/gl_x11/evas_x_main.c index db8d70a..7cad2e6 100644 --- a/src/modules/evas/engines/gl_x11/evas_x_main.c +++ b/src/modules/evas/engines/gl_x11/evas_x_main.c @@ -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; } -- 2.7.4