From: raster Date: Sat, 20 Aug 2011 04:22:24 +0000 (+0000) Subject: hey.. if we use magic poinrters like... -1 for not existing... null X-Git-Tag: 2.0_alpha~35^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88ea9be8d195646dec2e5dc5f72f3a50516b3cfa;p=framework%2Fuifw%2Fefreet.git hey.. if we use magic poinrters like... -1 for not existing... null would probably be fine though here)... we should always then handle all the cases correctly! fix segv in efreet shutdown git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/efreet@62616 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/efreet_cache.c b/src/lib/efreet_cache.c index a476294..fb577ad 100644 --- a/src/lib/efreet_cache.c +++ b/src/lib/efreet_cache.c @@ -232,7 +232,7 @@ efreet_cache_shutdown(void) } if (old_desktop_caches) - WRN("This application has not properly closed all its desktop references!"); + ERR("This application has not properly closed all its desktop references!"); EINA_LIST_FREE(old_desktop_caches, d) { eina_hash_free(d->hash); @@ -1121,15 +1121,18 @@ cache_update_cb(void *data __UNUSED__, Ecore_File_Monitor *em __UNUSED__, IF_RELEASE(util_cache_names_key); IF_RELEASE(util_cache_hash_key); - d = NEW(Efreet_Old_Cache, 1); - if (!d) goto error; - d->hash = desktops; - d->ef = desktop_cache; - old_desktop_caches = eina_list_append(old_desktop_caches, d); - - desktops = eina_hash_string_superfast_new(NULL); - desktop_cache = NULL; - + if ((desktop_cache) && (desktop_cache != NON_EXISTING)) + { + d = NEW(Efreet_Old_Cache, 1); + if (!d) goto error; + d->hash = desktops; + d->ef = desktop_cache; + old_desktop_caches = eina_list_append(old_desktop_caches, d); + + desktops = eina_hash_string_superfast_new(NULL); + desktop_cache = NULL; + } + efreet_cache_array_string_free(util_cache_names); util_cache_names = NULL;