eo - base class protection against NULL old_parent_pd

bug T569 still shows that we have cases where, during e shutdown, we
still get eo_data_scope_get() return NULL for a parent object.
whatever this is, segfaulting is much worse than protecting and
marching on. so protect
This commit is contained in:
Carsten Haitzler 2013-11-26 17:01:26 +09:00
parent 2b5b3438e8
commit 55d8156414
1 changed files with 3 additions and 2 deletions

View File

@ -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);
}