diff --git a/src/lib/evas/cache/evas_cache_image.c b/src/lib/evas/cache/evas_cache_image.c index 8504e1f403..9608c2188a 100644 --- a/src/lib/evas/cache/evas_cache_image.c +++ b/src/lib/evas/cache/evas_cache_image.c @@ -1103,6 +1103,9 @@ evas_cache_image_size_set(Image_Entry *im, unsigned int w, unsigned int h) im2->references = 1; im2->flags.loaded = EINA_TRUE; if (cache->func.debug) cache->func.debug("size_set", im2); + /* this drop is for handling refereces in this function */ + evas_cache_image_drop(im); + /* we don't need im at this point, drop it! */ evas_cache_image_drop(im); return im2; @@ -1110,6 +1113,9 @@ on_error: SLKL(engine_lock); if (im2) _evas_cache_image_entry_delete(cache, im2); SLKU(engine_lock); + /* this drop is for handling refereces in this function */ + evas_cache_image_drop(im); + /* we don't need im at this point, drop it! */ evas_cache_image_drop(im); return NULL; }