From 7a4e626074af82eaeda292ce8c9aeacf4c317dd5 Mon Sep 17 00:00:00 2001 From: Gustavo Lima Chaves Date: Tue, 17 Aug 2010 16:37:01 +0000 Subject: [PATCH] [PATCH 1/3] checking if the pointer is null in edje_cache.c SVN revision: 51255 --- legacy/edje/src/lib/edje_cache.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/legacy/edje/src/lib/edje_cache.c b/legacy/edje/src/lib/edje_cache.c index 1109424bce..860fa6fcc6 100644 --- a/legacy/edje/src/lib/edje_cache.c +++ b/legacy/edje/src/lib/edje_cache.c @@ -429,17 +429,16 @@ _edje_cache_coll_unref(Edje_File *edf, Edje_Part_Collection *edc) if (edc->references != 0) return; ce = eina_hash_find(edf->collection, edc->part); - - if (ce->ref) + if (!ce) + { + ERR("Something is wrong with reference count of '%s'.", edc->part); + } + else if (ce->ref) { ce->ref = NULL; edf->collection_cache = eina_list_prepend(edf->collection_cache, edc); _edje_cache_coll_clean(edf); } - else - { - ERR("Something is wrong with reference count of '%s'.", edc->part); - } } static void