diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-12-09 21:40:10 +0100 |
---|---|---|
committer | Cedric BAIL <cedric.bail@free.fr> | 2019-12-13 09:33:04 -0800 |
commit | 4982da63273f60bc3e5a114ee407e9fbd166dd75 (patch) | |
tree | 766075e80a2e7418a77e00cfb08932931933b63b | |
parent | 349df856791abf9adb2e3f66c90e476947e3431b (diff) |
evas_focus: protect against faulty focus object
the problem is that we only remove ourselfs from the focused list in the
invalidator. However, we allowed invalidated objects to be part of this
hash, which made everything go boom.
With this commit you at least only get one error and you should fix up
this case.
This fixes random errors in enlightenment (That are appearing theire
since seats have been introduced to evas, the problem before invalidate
was that the object was already destructor called, but not fully
destructed yet).
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10845
-rw-r--r-- | src/lib/evas/canvas/evas_focus.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_focus.c b/src/lib/evas/canvas/evas_focus.c index e11df7887d..83678fc64a 100644 --- a/src/lib/evas/canvas/evas_focus.c +++ b/src/lib/evas/canvas/evas_focus.c | |||
@@ -223,6 +223,8 @@ _efl_canvas_object_seat_focus_add(Eo *eo_obj, | |||
223 | return EINA_FALSE; | 223 | return EINA_FALSE; |
224 | MAGIC_CHECK_END(); | 224 | MAGIC_CHECK_END(); |
225 | 225 | ||
226 | EINA_SAFETY_ON_FALSE_RETURN_VAL(!efl_invalidating_get(eo_obj) && !efl_invalidated_get(eo_obj), EINA_FALSE); | ||
227 | |||
226 | event_id = _evas_event_counter; | 228 | event_id = _evas_event_counter; |
227 | if (seat) default_seat = _default_seat_get(eo_obj); | 229 | if (seat) default_seat = _default_seat_get(eo_obj); |
228 | else default_seat = seat = _default_seat_get(eo_obj); | 230 | else default_seat = seat = _default_seat_get(eo_obj); |