forked from enlightenment/efl
evas async preload - fix valgrind issue in accessing image after free
cache flish and async end ended up dropping some cacneled images that were then accessed further in the cancel func for the thread. this fixes that @fix
This commit is contained in:
parent
3f92bfc45b
commit
e2fe31fc09
|
@ -462,13 +462,6 @@ _evas_cache_image_async_cancel(void *data)
|
|||
_evas_cache_image_entry_delete(ie->cache, ie);
|
||||
return;
|
||||
}
|
||||
if (ie->flags.loaded) _evas_cache_image_async_end(ie);
|
||||
if (ie->references == 0)
|
||||
{
|
||||
_evas_cache_image_lru_add(ie);
|
||||
cache = ie->cache;
|
||||
}
|
||||
if (cache) evas_cache_image_flush(cache);
|
||||
SLKL(ie->lock_task);
|
||||
if (ie->targets)
|
||||
{
|
||||
|
@ -483,6 +476,13 @@ _evas_cache_image_async_cancel(void *data)
|
|||
ie);
|
||||
}
|
||||
SLKU(ie->lock_task);
|
||||
if (ie->references == 0)
|
||||
{
|
||||
_evas_cache_image_lru_add(ie);
|
||||
cache = ie->cache;
|
||||
}
|
||||
if (ie->flags.loaded) _evas_cache_image_async_end(ie);
|
||||
if (cache) evas_cache_image_flush(cache);
|
||||
}
|
||||
|
||||
// note - preload_add assumes a target is ONLY added ONCE to the image
|
||||
|
|
Loading…
Reference in New Issue