forked from enlightenment/efl
evas gl: Make sure a deleted image can't be the target
If we delete the image that was the target surface for gl rendering, a crash would occur on the next render cycle. Unlikely but not impossible to trigger from app side. @fix
This commit is contained in:
parent
06a7beec52
commit
e7eb97f3b0
|
@ -769,6 +769,9 @@ evas_gl_common_image_free(Evas_GL_Image *im)
|
||||||
im->references--;
|
im->references--;
|
||||||
if (im->references > 0) return;
|
if (im->references > 0) return;
|
||||||
|
|
||||||
|
if (im->gc && (im->gc->pipe[0].shader.surface == im))
|
||||||
|
evas_gl_common_context_target_surface_set(im->gc, im->gc->def_surface);
|
||||||
|
|
||||||
if (im->fglyph)
|
if (im->fglyph)
|
||||||
{
|
{
|
||||||
im->gc->font_glyph_images = eina_list_remove(im->gc->font_glyph_images, im);
|
im->gc->font_glyph_images = eina_list_remove(im->gc->font_glyph_images, im);
|
||||||
|
|
Loading…
Reference in New Issue