From bd2152a1cc1dc0f689d61573a63d879778c48166 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 13 Mar 2014 10:39:27 +0900 Subject: [PATCH] evas: protect against potential NULL access. Fix CID 1191919. --- src/lib/evas/canvas/evas_clip.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/evas/canvas/evas_clip.c b/src/lib/evas/canvas/evas_clip.c index 918fe363a7..01d2edecc0 100644 --- a/src/lib/evas/canvas/evas_clip.c +++ b/src/lib/evas/canvas/evas_clip.c @@ -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