Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_icon_theme.c 


Log Message:
- and make sure it dosen't exist before we create it

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_icon_theme.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_icon_theme.c    25 Sep 2006 05:02:39 -0000      1.5
+++ ewl_icon_theme.c    25 Sep 2006 05:03:27 -0000      1.6
@@ -17,9 +17,12 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       ewl_icon_theme_cache = ecore_hash_new(ecore_str_hash, 
ecore_str_compare);
-       ecore_hash_set_free_key(ewl_icon_theme_cache, ewl_icon_theme_cb_free);
-       ecore_hash_set_free_value(ewl_icon_theme_cache, ewl_icon_theme_cb_free);
+       if (!ewl_icon_theme_cache)
+       {
+               ewl_icon_theme_cache = ecore_hash_new(ecore_str_hash, 
ecore_str_compare);
+               ecore_hash_set_free_key(ewl_icon_theme_cache, 
ewl_icon_theme_cb_free);
+               ecore_hash_set_free_value(ewl_icon_theme_cache, 
ewl_icon_theme_cb_free);
+       }
 
        DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
@@ -61,6 +64,7 @@
        /* destroy the cache and re-create it */
        if (ewl_icon_theme_cache)
                ecore_hash_destroy(ewl_icon_theme_cache);
+
        ewl_icon_theme_cache = ecore_hash_new(ecore_str_hash, 
ecore_str_compare);
        ecore_hash_set_free_key(ewl_icon_theme_cache, ewl_icon_theme_cb_free);
        ecore_hash_set_free_value(ewl_icon_theme_cache, ewl_icon_theme_cb_free);



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to