From: Mike Blumenkrantz Date: Wed, 29 May 2019 13:18:01 +0000 (-0400) Subject: elm/gengrid: handle focus events when no previous focus item was set X-Git-Tag: accepted/tizen/unified/20190604.014647~81 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=654abfa1a6bbc4759e3be3aeb69b56a30b8159fb;p=platform%2Fupstream%2Fefl.git elm/gengrid: handle focus events when no previous focus item was set Summary: this triggers fewer error messages @fix Depends on D8962 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8963 --- diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index 17cd530..18edcf1 100755 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -5732,8 +5732,11 @@ _gengrid_element_focused(void *data, const Efl_Event *ev) Efl_Ui_Widget *focused = efl_ui_focus_manager_focus_get(ev->object); Elm_Widget_Item *item = NULL, *old_item = NULL; - item = efl_ui_focus_parent_provider_gen_item_fetch(pd->provider, focused); - old_item = efl_ui_focus_parent_provider_gen_item_fetch(pd->provider, ev->info); + /* there may be no focus during widget setup */ + if (focused) + item = efl_ui_focus_parent_provider_gen_item_fetch(pd->provider, focused); + if (ev->info) + old_item = efl_ui_focus_parent_provider_gen_item_fetch(pd->provider, ev->info); if (old_item) {