summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHosang Kim <hosang12.kim@samsung.com>2017-01-02 15:17:40 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-01-02 15:17:40 +0900
commitfc05adbb478b6d0738014027e1273cbce4ea9fae (patch)
treeb38902c0a457467ac6f7312488982a2906fccd3a
parentb1f1cd14c21948ba8a6b629ff8c686f68f891897 (diff)
downloadefl-fc05adbb478b6d0738014027e1273cbce4ea9fae.tar.gz
evas_events: add checking NULL logic to source mouse event.
Summary: When the proxy's source is updated, the proxy's event list will be updated, too. But there is no way now. So add defensive code for protecting segment fault. @fix Reviewers: woohyun, raster, jpeg Reviewed By: jpeg Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D4508
-rw-r--r--src/lib/evas/canvas/evas_events.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c
index 5dc31a3962..d01dfec48a 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -527,6 +527,11 @@ _evas_event_source_mouse_move_events(Evas_Object *eo_obj, Evas *eo_e,
EINA_LIST_FOREACH(copy, l, eo_child)
{
child = efl_data_scope_get(eo_child, EFL_CANVAS_OBJECT_CLASS);
+ //FIXME: When object is deleted in the src_event_in list,
+ //the src_event_in list should be updated. But now there is no way.
+ //So add checking NULL logic, please delete it if you make a better way.
+ if (!child) continue;
+
obj_pdata = _evas_object_pointer_data_get(pdata, child);
if (!obj_pdata)
{
@@ -602,6 +607,10 @@ _evas_event_source_mouse_move_events(Evas_Object *eo_obj, Evas *eo_e,
EINA_LIST_FOREACH(copy, l, eo_child)
{
child = efl_data_scope_get(eo_child, EFL_CANVAS_OBJECT_CLASS);
+ //FIXME: When object is deleted in the src_event_in list,
+ //the src_event_in list should be updated. But now there is no way.
+ //So add checking NULL logic, please delete it if you make a better way.
+ if (!child) continue;
obj_pdata = _evas_object_pointer_data_get(pdata, child);
if (!obj_pdata)
@@ -815,6 +824,11 @@ _evas_event_source_wheel_events(Evas_Object *eo_obj, Evas *eo_e,
if (src->delete_me) return;
child = efl_data_scope_get(eo_child, EFL_CANVAS_OBJECT_CLASS);
+ //FIXME: When object is deleted in the src_event_in list,
+ //the src_event_in list should be updated. But now there is no way.
+ //So add checking NULL logic, please delete it if you make a better way.
+ if (!child) continue;
+
obj_pdata = _evas_object_pointer_data_get(pdata, child);
if (!obj_pdata)
{