evas_events: NULL check before evas_event_freezes_through.

In some cases focused_obj can be NULL. Add a check before
calling evas_event_freezes_through. Was causing a SEGV
in some situations. Avoiding a crash here is good
but we also need to warn for future debugging to
be more useful.
Differential Revision: https://phab.enlightenment.org/D7027
This commit is contained in:
Alastair Poole 2018-09-12 19:18:03 +00:00 committed by Marcel Hollerbach
parent 111f2fe89c
commit 0b79c20c16
1 changed files with 6 additions and 0 deletions

View File

@ -3206,6 +3206,12 @@ _key_event_dispatch(Evas_Public_Data *e, void *event_info,
Evas_Object_Protected_Data *focused_obj =
efl_data_scope_get(focused, EFL_CANVAS_OBJECT_CLASS);
if (!focused_obj)
{
WRN("No element focused");
return;
}
if (!e->is_frozen && !evas_event_freezes_through(focused, focused_obj))
{
evas_object_event_callback_call(focused, focused_obj,