evas: protect against potential NULL access.

Fix CID 1191919.
This commit is contained in:
Cedric BAIL 2014-03-13 10:39:27 +09:00
parent 4dcf49c6e9
commit bd2152a1cc
1 changed files with 5 additions and 0 deletions

View File

@ -235,6 +235,11 @@ _evas_object_clip_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Object *
CRI("Setting object %p from Evas (%p) to another Evas (%p)", obj, obj->layer->evas, clip->layer->evas);
return;
}
if (!obj->layer || !clip->layer)
{
CRI("Object %p or clip %p layer is not set !", obj, clip);
return;
}
if (evas_object_intercept_call_clip_set(eo_obj, obj, eo_clip)) return;
// illegal to set anything but a rect as a clip