summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-11-18 11:49:52 +0900
committerHermet Park <hermetpark@gmail.com>2019-11-18 13:08:40 +0900
commit54217cda84b4019dfe8fd3428c7258f3ac58ae8c (patch)
tree9a69ab6fb1cc0dc62a02898e1fcfdb29f6a9ef48
parent618bce8038b6362c0de232498566ecf97dc2d17e (diff)
evas image cache: drop cache properly,
the default reference is 1, thus we should drop it unless if it's more than 1,
-rw-r--r--src/lib/evas/common/evas_common_generic_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/evas/common/evas_common_generic_cache.c b/src/lib/evas/common/evas_common_generic_cache.c
index 55bcf725d6..ddb055deb2 100644
--- a/src/lib/evas/common/evas_common_generic_cache.c
+++ b/src/lib/evas/common/evas_common_generic_cache.c
@@ -50,7 +50,7 @@ generic_cache_data_set(Generic_Cache *cache, void *key, void *surface)
50 { 50 {
51 entry = eina_list_data_get(eina_list_last(cache->lru_list)); 51 entry = eina_list_data_get(eina_list_last(cache->lru_list));
52 // if its still being ref. 52 // if its still being ref.
53 if (entry->ref) return; 53 if (entry->ref > 1) return;
54 eina_hash_del(cache->hash, &entry->key, entry); 54 eina_hash_del(cache->hash, &entry->key, entry);
55 cache->lru_list = eina_list_remove_list(cache->lru_list, eina_list_last(cache->lru_list)); 55 cache->lru_list = eina_list_remove_list(cache->lru_list, eina_list_last(cache->lru_list));
56 cache->free_func(cache->user_data, entry->data); 56 cache->free_func(cache->user_data, entry->data);