Don't crash when an error pop-up occurs before the compositor is set up.
authorDerek Foreman <derekf@osg.samsung.com>
Thu, 26 Feb 2015 19:43:10 +0000 (14:43 -0500)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Thu, 26 Feb 2015 19:43:10 +0000 (14:43 -0500)
Reviewers: devilhorns, zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2059

src/bin/e_comp_wl.c

index 1ce576b..9e22899 100644 (file)
@@ -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;