Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_tree2.c 


Log Message:
- only save back to the hash if we create a new list. this keeps the hash
  from freeing our list out from under us when it's replaced.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_tree2.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -3 -r1.53 -r1.54
--- ewl_tree2.c 24 Jan 2007 11:39:28 -0000      1.53
+++ ewl_tree2.c 1 Feb 2007 10:53:47 -0000       1.54
@@ -383,7 +383,7 @@
 ewl_tree2_row_expand(Ewl_Tree2 *tree, void *data, unsigned int row)
 {
        Ecore_List *exp;
-       int i;
+       int i, created = 0;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("tree", tree);
@@ -397,6 +397,7 @@
        {
                ewl_tree2_create_expansions_hash(tree);
                exp = ecore_list_new();
+               created = 1;
        }
        else
        {
@@ -411,7 +412,9 @@
        }
 
        ecore_list_insert(exp, (void *)row);
-       ecore_hash_set(tree->expansions, data, exp);
+
+       if (created)
+               ecore_hash_set(tree->expansions, data, exp);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to