cedric pushed a commit to branch master.

http://git.enlightenment.org/tools/expedite.git/commit/?id=9cf0688f994c8bae395a79be39b1551278861794

commit 9cf0688f994c8bae395a79be39b1551278861794
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Tue Sep 15 07:45:13 2015 +0200

    vg: fix inapropriate parenting of gradient.
---
 src/bin/vg_basic_gradient.c | 2 +-
 src/bin/vg_scaled.c         | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/bin/vg_basic_gradient.c b/src/bin/vg_basic_gradient.c
index 66ef482..faa9e26 100644
--- a/src/bin/vg_basic_gradient.c
+++ b/src/bin/vg_basic_gradient.c
@@ -45,7 +45,7 @@ static void _setup(void)
 
         eo_do(vector, root = evas_obj_vg_root_node_get());
 
-        gradient = eo_add(EFL_VG_GRADIENT_LINEAR_CLASS, root);
+        gradient = eo_add(EFL_VG_GRADIENT_LINEAR_CLASS, NULL);
         eo_do(gradient,
               efl_gfx_gradient_stop_set(stops, 3),
               efl_gfx_gradient_spread_set(EFL_GFX_GRADIENT_SPREAD_REFLECT),
diff --git a/src/bin/vg_scaled.c b/src/bin/vg_scaled.c
index 1e270a3..a0003e5 100644
--- a/src/bin/vg_scaled.c
+++ b/src/bin/vg_scaled.c
@@ -45,7 +45,7 @@ static void _setup(void)
 
         eo_do(vector, root = evas_obj_vg_root_node_get());
 
-        o_gradient[i] = gradient = eo_add(EFL_VG_GRADIENT_LINEAR_CLASS, root);
+        o_gradient[i] = gradient = eo_add(EFL_VG_GRADIENT_LINEAR_CLASS, NULL);
         eo_do(gradient,
               efl_gfx_gradient_stop_set(stops, 3),
               efl_gfx_gradient_spread_set(EFL_GFX_GRADIENT_SPREAD_REFLECT),
@@ -68,7 +68,11 @@ static void _cleanup(void)
 {
    unsigned int i;
 
-   for (i = 0; i < OBNUM; i++) eo_del(o_objects[i]);
+   for (i = 0; i < OBNUM; i++)
+     {
+        eo_del(o_objects[i]);
+        o_objects[i] = NULL;
+     }
 }
 
 /* loop - do things */

-- 


Reply via email to