Evas: Fix Evas_GL engine shutdown error.
authorSung W. Park <dunamis.park@samsung.com>
Tue, 30 Jul 2013 10:45:40 +0000 (19:45 +0900)
committerSung W. Park <dunamis.park@samsung.com>
Tue, 30 Jul 2013 10:45:40 +0000 (19:45 +0900)
It was trying to use access a struct for egl_disp after the struct
was freed..

src/modules/evas/engines/gl_x11/evas_engine.c
src/modules/evas/engines/wayland_egl/evas_engine.c

index 2bf934cb912e90e978dbaab9237ff0286885ff0e..82f97d64a6a867f980961d4e94f60904b5d20737 100644 (file)
@@ -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);
      }
index 65edccaa328de489017c94d2be5208066545241e..afcc508cc2dd86e717409feabe7e7e66409b3875 100644 (file)
@@ -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);
      }