summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas
diff options
context:
space:
mode:
authorMrunal Sovani <mrunal.s@samsung.com>2015-09-24 14:57:10 +0100
committerTom Hacohen <tom@stosb.com>2015-09-24 14:59:01 +0100
commit9ed199d7098098d48778b706d057efa9f3497d58 (patch)
treeca61caef5a0b61dc841d139d93ce706df7733981 /src/lib/evas/canvas
parent17b4622f1b319d8330a9f441d259e6b15e200aa7 (diff)
Evas smart: Add obj type safety check to callback_del.
Summary: Evas_Smart_Data retrieved from eo_data_scope_get might be NULL in case the input Evas_Object is not valid Evas_Object. The smart data gets dereferenced and can cause a crash if its NULL Hence return in case smart data is NULL. @fix Signed-off-by: Mrunal Sovani <mrunal.s@samsung.com> Reviewers: raster, Hermet, tasn Reviewed By: tasn Subscribers: singh.amitesh, cedric, sachin.dev Differential Revision: https://phab.enlightenment.org/D3106
Diffstat (limited to 'src/lib/evas/canvas')
-rw-r--r--src/lib/evas/canvas/evas_object_smart.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c
index cacc5a4fe5..1529f75f1b 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -722,6 +722,7 @@ evas_object_smart_callback_del(Evas_Object *eo_obj, const char *event, Evas_Smar
722 return NULL; 722 return NULL;
723 MAGIC_CHECK_END(); 723 MAGIC_CHECK_END();
724 o = eo_data_scope_get(eo_obj, MY_CLASS); 724 o = eo_data_scope_get(eo_obj, MY_CLASS);
725 if (!o) return NULL;
725 726
726 if (!event) return NULL; 727 if (!event) return NULL;
727 const Eo_Event_Description *eo_desc = eo_base_legacy_only_event_description_get(event); 728 const Eo_Event_Description *eo_desc = eo_base_legacy_only_event_description_get(event);