From dd2058d8a6c6e70cdf245bc9f44d395b369fe27b Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Thu, 26 Feb 2015 14:43:10 -0500 Subject: [PATCH] Don't crash when an error pop-up occurs before the compositor is set up. Reviewers: devilhorns, zmike Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2059 --- src/bin/e_comp_wl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 1ce576b7f..9e22899c4 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -482,10 +482,12 @@ _e_comp_wl_client_focus(E_Client *ec) wl_array_for_each(k, &e_comp->wl_comp_data->kbd.keys) e_comp_wl_input_keyboard_state_update(e_comp->wl_comp_data, *k, EINA_TRUE); + ec->comp_data->focus_update = 1; + if (!ec->comp_data->surface) return; + /* send keyboard_enter to all keyboard resources */ wc = wl_resource_get_client(ec->comp_data->surface); serial = wl_display_next_serial(e_comp->wl_comp_data->wl.disp); - ec->comp_data->focus_update = 1; EINA_LIST_FOREACH(e_comp->wl_comp_data->kbd.resources, l, res) { if (wl_resource_get_client(res) != wc) continue;