diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2019-07-31 14:05:06 +0100 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2019-07-31 14:05:55 +0100 |
commit | 79d3748557e23cdd0edbe7a917d7038ec590cd59 (patch) | |
tree | 9a6bf946c79f9a6ebca1cdb2e1f4996a6a202414 /src/lib | |
parent | 16866e4ef2cc6a646b5e6103eb0ff16f20c42838 (diff) |
evas events - fix segv if pointer data is freed by cb
callback can free what is in context. avoid that problem
@fix
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/evas/canvas/evas_events.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c index 5ffcd1f9a2..dae351c008 100644 --- a/src/lib/evas/canvas/evas_events.c +++ b/src/lib/evas/canvas/evas_events.c | |||
@@ -2250,6 +2250,8 @@ _canvas_event_feed_mouse_move_internal(Evas_Public_Data *e, Efl_Input_Pointer_Da | |||
2250 | copy = evas_event_list_copy(pdata->seat->object.in); | 2250 | copy = evas_event_list_copy(pdata->seat->object.in); |
2251 | EINA_LIST_FOREACH(copy, l, eo_obj) | 2251 | EINA_LIST_FOREACH(copy, l, eo_obj) |
2252 | { | 2252 | { |
2253 | Eina_Bool check_nogrep = EINA_FALSE; | ||
2254 | |||
2253 | obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); | 2255 | obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); |
2254 | obj_pdata = _evas_object_pointer_data_get(pdata, obj); | 2256 | obj_pdata = _evas_object_pointer_data_get(pdata, obj); |
2255 | if (!obj_pdata) | 2257 | if (!obj_pdata) |
@@ -2258,6 +2260,9 @@ _canvas_event_feed_mouse_move_internal(Evas_Public_Data *e, Efl_Input_Pointer_Da | |||
2258 | ev->device); | 2260 | ev->device); |
2259 | continue; | 2261 | continue; |
2260 | } | 2262 | } |
2263 | if ((obj_pdata->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) && | ||
2264 | (pdata->seat->nogrep > 0)) | ||
2265 | check_nogrep = EINA_TRUE; | ||
2261 | if ((!e->is_frozen) && | 2266 | if ((!e->is_frozen) && |
2262 | _evas_event_object_pointer_allow(eo_obj, obj, obj_pdata) && | 2267 | _evas_event_object_pointer_allow(eo_obj, obj, obj_pdata) && |
2263 | (!evas_object_is_source_invisible(eo_obj, obj) || | 2268 | (!evas_object_is_source_invisible(eo_obj, obj) || |
@@ -2275,8 +2280,7 @@ _canvas_event_feed_mouse_move_internal(Evas_Public_Data *e, Efl_Input_Pointer_Da | |||
2275 | } | 2280 | } |
2276 | else | 2281 | else |
2277 | outs = eina_list_append(outs, eo_obj); | 2282 | outs = eina_list_append(outs, eo_obj); |
2278 | if ((obj_pdata->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) && | 2283 | if (check_nogrep) |
2279 | (pdata->seat->nogrep > 0)) | ||
2280 | { | 2284 | { |
2281 | eina_list_free(copy); | 2285 | eina_list_free(copy); |
2282 | eina_list_free(outs); | 2286 | eina_list_free(outs); |