evas: Evas_VG_Root_Node parent will be NULL during destructor.
authorCedric BAIL <cedric@osg.samsung.com>
Fri, 3 Apr 2015 14:30:53 +0000 (16:30 +0200)
committerCedric BAIL <cedric@osg.samsung.com>
Fri, 3 Apr 2015 14:30:53 +0000 (16:30 +0200)
src/lib/evas/canvas/evas_vg_root_node.c

index 09834b418fff5a3ca6898255191f8dee5900197b..d6f2c51a34510b555cce56510b3d32314e331fb7 100644 (file)
@@ -42,7 +42,7 @@ _evas_vg_root_node_changed(void *data, Eo *obj EINA_UNUSED,
 {
    Evas_VG_Root_Node_Data *pd = data;
 
-   evas_object_change(pd->parent, pd->data);
+   if (pd->parent) evas_object_change(pd->parent, pd->data);
    return EINA_TRUE;
 }
 
@@ -60,7 +60,7 @@ _evas_vg_root_node_eo_base_parent_set(Eo *obj,
    else
      {
         pd->parent = parent;
-        pd->data = eo_data_scope_get(parent, EVAS_OBJECT_CLASS);
+        pd->data = parent ? eo_data_scope_get(parent, EVAS_OBJECT_CLASS) : NULL;
      }
 }