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 12542247bf..85a1ddce7f 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_core.c +++ b/src/modules/evas/engines/gl_common/evas_gl_core.c @@ -1961,6 +1961,9 @@ evgl_surface_destroy(void *eng_data, EVGL_Surface *sfc) if ((dbg = evgl_engine->api_debug_mode)) DBG("Destroying surface sfc %p (eng %p)", sfc, eng_data); + if (sfc->current_ctx && sfc->current_ctx->current_sfc == sfc) + sfc->current_ctx->current_sfc = NULL; + if ((rsc->current_ctx) && (rsc->current_ctx->current_sfc == sfc) ) { if (evgl_engine->api_debug_mode)