evas: Check for null pointer deref

Summary:
Earlier places in the function are testing if obj->layer is null, so
should be checked here as well before it's used.

@fix CID1371826

Reviewers: jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4707
This commit is contained in:
Bryce Harrington 2017-03-09 15:45:03 +09:00 committed by Jean-Philippe Andre
parent d550190d6b
commit b9c8c9c08c
1 changed files with 1 additions and 1 deletions

View File

@ -257,7 +257,7 @@ _efl_canvas_group_group_member_add(Eo *smart_obj, Evas_Smart_Data *o, Evas_Objec
{
if (obj->in_layer)
evas_object_release(eo_obj, obj, 1);
else if ((--obj->layer->usage) == 0)
else if (obj->layer && ((--obj->layer->usage) == 0))
evas_layer_del(obj->layer);
}
else if (obj->in_layer)