From 9c36323c1554597eff5fd8225ca128ac3d927f57 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Tue, 16 Jun 2015 17:21:50 +0200 Subject: [PATCH] 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); -- 2.7.4