summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryce Harrington <bryce@osg.samsung.com>2017-03-09 15:45:03 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-03-09 15:47:43 +0900
commitb9c8c9c08c88734b9d9e83c8b1247f9d19190432 (patch)
tree2a68f176d8c2ab392e5643d5e429766459c01b38
parentd550190d6be8fe4d1ba44042ad8d9c17cf232079 (diff)
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
-rw-r--r--src/lib/evas/canvas/evas_object_smart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c
index d2f0a8337a..805a623c4c 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -257,7 +257,7 @@ _efl_canvas_group_group_member_add(Eo *smart_obj, Evas_Smart_Data *o, Evas_Objec
257 { 257 {
258 if (obj->in_layer) 258 if (obj->in_layer)
259 evas_object_release(eo_obj, obj, 1); 259 evas_object_release(eo_obj, obj, 1);
260 else if ((--obj->layer->usage) == 0) 260 else if (obj->layer && ((--obj->layer->usage) == 0))
261 evas_layer_del(obj->layer); 261 evas_layer_del(obj->layer);
262 } 262 }
263 else if (obj->in_layer) 263 else if (obj->in_layer)