cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9c36323c1554597eff5fd8225ca128ac3d927f57

commit 9c36323c1554597eff5fd8225ca128ac3d927f57
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Tue Jun 16 17:21:50 2015 +0200

    evas: properly handle cleanup case.
---
 src/lib/evas/canvas/evas_object_vg.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_vg.c 
b/src/lib/evas/canvas/evas_object_vg.c
index f460719..9c86e97 100644
--- a/src/lib/evas/canvas/evas_object_vg.c
+++ b/src/lib/evas/canvas/evas_object_vg.c
@@ -95,6 +95,7 @@ void
 _evas_vg_eo_base_destructor(Eo *eo_obj, Evas_VG_Data *pd)
 {
    eo_unref(pd->root);
+   pd->root = NULL;
    eo_do_super(eo_obj, MY_CLASS, eo_destructor());
 }
 
@@ -229,10 +230,14 @@ evas_object_vg_render_pre(Evas_Object *eo_obj,
    // So just forcing it here if necessary
    rnd = eo_data_scope_get(vd->root, EFL_VG_BASE_CLASS);
 
-   //FIXME find the reason for NULL Base Class in some case?
-   if (!rnd) return;
-
-   if (rnd->changed)
+   // Once the destructor has been called, root node will be zero
+   // and a full redraw is still necessary.
+   if (!rnd)
+     {
+        evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, 
eo_obj, obj);
+        goto done;
+     }
+   else if (rnd->changed)
      {
         rnd->changed = EINA_FALSE;
         evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, 
eo_obj, obj);

-- 


Reply via email to