evas_cache_image: drop image after replacement
Summary: When a newly created Image_Entry works for instead of an old one, we need to drop it. And we did dorp it. The line calling ref and drop was added by following commit.d550190
evas image cache - add lots more locking to try stamp out any thread bug But it is missed by following commit.9f99ab1
evas cache: clear up caching locking and reference count. Reviewers: Hermet, raster, jsuya, cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10333
This commit is contained in:
parent
3358d9d475
commit
8da73f9a68
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue