spacegrapher pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d7c2acfa7a2d804a060fb860ca8228852f720f42
commit d7c2acfa7a2d804a060fb860ca8228852f720f42 Author: Dongyeon Kim <dy5....@samsung.com> Date: Mon Jan 11 10:11:58 2016 +0900 Evas GL: Reset current surface for all contexts to null when surface is destroyed When evas gl surface is destroyed, not only the current surface for the current context should be set to NULL, but current surface for all contexts should be reset. --- src/modules/evas/engines/gl_common/evas_gl_core.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/modules/evas/engines/gl_common/evas_gl_core.c b/src/modules/evas/engines/gl_common/evas_gl_core.c index ba3496a..f851d56 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_core.c +++ b/src/modules/evas/engines/gl_common/evas_gl_core.c @@ -2081,6 +2081,8 @@ int evgl_surface_destroy(void *eng_data, EVGL_Surface *sfc) { EVGL_Resource *rsc; + Eina_List *l; + EVGL_Context *ctx; Eina_Bool dbg; // Check input parameter @@ -2183,6 +2185,12 @@ evgl_surface_destroy(void *eng_data, EVGL_Surface *sfc) evgl_engine->surfaces = eina_list_remove(evgl_engine->surfaces, sfc); LKU(evgl_engine->resource_lock); + EINA_LIST_FOREACH(evgl_engine->contexts, l, ctx) + { + if (ctx->current_sfc == sfc) + ctx->current_sfc = NULL; + } + free(sfc); _surface_context_list_print(); --