aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-11-20 20:20:26 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-11-20 20:25:33 +0900
commit0355a6a296d8c4a22bf2a2e844a0ba0d4e0abd2e (patch)
tree35a34b7f8eefcafadb369692571350a9e1cd7929
parenteina: cleanup file destruction and reintroduce EINA_MAGIC use. (diff)
downloadefl-0355a6a296d8c4a22bf2a2e844a0ba0d4e0abd2e.tar.gz
eo - fix _parent_set in base clase when old_parent_pd is NULL
-rw-r--r--src/lib/eo/eo_base_class.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 95ca1b5640..b553178271 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -131,8 +131,9 @@ _parent_set(Eo *obj, void *class_data, va_list *list)
Private_Data *old_parent_pd;
old_parent_pd = eo_data_scope_get(pd->parent, EO_BASE_CLASS);
- old_parent_pd->children = eina_list_remove(old_parent_pd->children,
- obj);
+ if (old_parent_pd)
+ old_parent_pd->children = eina_list_remove(old_parent_pd->children,
+ obj);
eo_xunref(obj, pd->parent);
}
@@ -142,8 +143,9 @@ _parent_set(Eo *obj, void *class_data, va_list *list)
Private_Data *parent_pd = NULL;
parent_pd = eo_data_scope_get(parent_id, EO_BASE_CLASS);
- parent_pd->children = eina_list_append(parent_pd->children,
- obj);
+ if (parent_pd)
+ parent_pd->children = eina_list_append(parent_pd->children,
+ obj);
eo_xref(obj, pd->parent);
}
}