Eo: Add an error message when old parent is wrong.

This is an addition to raster's fix in
55d8156414
(eo - base class protection against NULL old_parent_pd)
This commit is contained in:
Tom Hacohen 2013-11-26 10:10:24 +00:00
parent b6bf2622dd
commit c5af1a7305
1 changed files with 10 additions and 2 deletions

View File

@ -132,8 +132,16 @@ _parent_set(Eo *obj, void *class_data, va_list *list)
old_parent_pd = eo_data_scope_get(pd->parent, EO_BASE_CLASS);
if (old_parent_pd)
old_parent_pd->children = eina_list_remove(old_parent_pd->children,
obj);
{
old_parent_pd->children = eina_list_remove(old_parent_pd->children,
obj);
}
else
{
ERR("CONTACT DEVS!!! SHOULD NEVER HAPPEN!!! Old parent %p for object %p is not a valid Eo object.",
pd->parent, obj);
}
eo_xunref(obj, pd->parent);
}