evas gl - remove freed gl image from context image list

fix asan memory mis-access

@fix
This commit is contained in:
Carsten Haitzler 2021-03-09 16:04:45 +00:00
parent d8023529a1
commit aa7be1a96d
2 changed files with 5 additions and 1 deletions

View File

@ -284,8 +284,8 @@ _evas_image_init_set(const Eina_File *f, const char *key,
ENFN->image_data_preload_cancel(ENC, o->engine_data, eo_obj, EINA_FALSE);
}
ENFN->image_free(ENC, o->engine_data);
o->engine_data = NULL;
}
o->engine_data = NULL;
o->load_error = EFL_GFX_IMAGE_LOAD_ERROR_NONE;
if (!lo) return;
lo->emile.scale_down_by = o->load_opts->scale_down_by;

View File

@ -702,6 +702,10 @@ evas_gl_common_image_free(Evas_GL_Image *im)
im->fglyph->ext_dat = NULL;
im->fglyph->ext_dat_free = NULL;
}
else if ((im->gc) && (im->gc->shared))
{
im->gc->shared->images = eina_list_remove(im->gc->shared->images, im);
}
if (im->gc)
evas_gl_common_context_flush(im->gc);