forked from enlightenment/efl
evas_object_smart: fix dereference of null
Summary: The cso could b NULL so we need to check if the cso is NULL or not before dereferencing it. Reviewers: jpeg, Hermet, jypark Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7075
This commit is contained in:
parent
ed621d7003
commit
040bef8f13
|
@ -581,16 +581,21 @@ evas_object_smart_members_get_direct(const Evas_Object *eo_obj)
|
|||
static void
|
||||
_efl_canvas_group_group_members_all_del_internal(Evas_Smart_Data *o)
|
||||
{
|
||||
Evas_Object_Smart_Clipped_Data *cso = o->clipped ? o->data : NULL;
|
||||
Evas_Object *clipper;
|
||||
Evas_Object_Protected_Data *memobj;
|
||||
Eina_Inlist *itrn;
|
||||
|
||||
EINA_INLIST_FOREACH_SAFE(o->contained, itrn, memobj)
|
||||
clipper = _smart_clipper_get(o);
|
||||
if (clipper)
|
||||
{
|
||||
if (memobj->object != cso->clipper)
|
||||
_evas_wrap_del(&memobj->object, memobj);
|
||||
EINA_INLIST_FOREACH_SAFE(o->contained, itrn, memobj)
|
||||
{
|
||||
if (memobj->object != clipper)
|
||||
_evas_wrap_del(&memobj->object, memobj);
|
||||
}
|
||||
_evas_wrap_del(&clipper, efl_data_scope_get(clipper, EFL_CANVAS_OBJECT_CLASS));
|
||||
}
|
||||
_evas_wrap_del(&cso->clipper, efl_data_scope_get(cso->clipper, EFL_CANVAS_OBJECT_CLASS));
|
||||
|
||||
o->group_del_called = EINA_TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue