From: Sung W. Park Date: Tue, 30 Jul 2013 10:45:40 +0000 (+0900) Subject: Evas: Fix Evas_GL engine shutdown error. X-Git-Tag: submit/efl/20131015.063327~191 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ac17a52d5ecf9f81b6f3441b183078a53851810;p=platform%2Fupstream%2Fefl.git Evas: Fix Evas_GL engine shutdown error. It was trying to use access a struct for egl_disp after the struct was freed.. --- diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c index 2bf934cb91..82f97d64a6 100644 --- a/src/modules/evas/engines/gl_x11/evas_engine.c +++ b/src/modules/evas/engines/gl_x11/evas_engine.c @@ -1051,6 +1051,8 @@ eng_output_free(void *data) #endif if (re->win) { + if (gl_wins == 1) evgl_engine_shutdown(re); + #ifdef GL_GLES eng_window_free(re->win); #else @@ -1069,7 +1071,6 @@ eng_output_free(void *data) if (re->rects_prev[1]) evas_common_tilebuf_free_render_rects(re->rects_prev[1]); if (re->rects_prev[2]) evas_common_tilebuf_free_render_rects(re->rects_prev[2]); - if (gl_wins == 0) evgl_engine_shutdown(re); free(re); } diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c index 65edccaa32..afcc508cc2 100644 --- a/src/modules/evas/engines/wayland_egl/evas_engine.c +++ b/src/modules/evas/engines/wayland_egl/evas_engine.c @@ -879,6 +879,8 @@ eng_output_free(void *data) if (re->win) { + if (gl_wins == 1) evgl_engine_shutdown(re); + eng_window_free(re->win); gl_wins--; } @@ -893,7 +895,6 @@ eng_output_free(void *data) if (re->rects_prev[2]) evas_common_tilebuf_free_render_rects(re->rects_prev[2]); - if (gl_wins == 0) evgl_engine_shutdown(re); free(re); }