From: Preshit Agarwal Date: Tue, 21 Jun 2016 08:57:43 +0000 (+0530) Subject: KeyRouter: Add destroyed surface check before removing grab mode. X-Git-Tag: submit/tizen/20160627.040945~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F61%2F75761%2F4;p=platform%2Fcore%2Fuifw%2Fe-mod-tizen-keyrouter.git KeyRouter: Add destroyed surface check before removing grab mode. Change-Id: Ia1e847ab94af5e00cf156572240ac1bc5b255c25 Signed-off-by: Preshit Agarwal --- diff --git a/src/e_mod_keyrouter_list.c b/src/e_mod_keyrouter_list.c index 4c38454..2ded4ee 100644 --- a/src/e_mod_keyrouter_list.c +++ b/src/e_mod_keyrouter_list.c @@ -370,8 +370,11 @@ e_keyrouter_remove_client_from_list(struct wl_resource *surface, struct wl_clien if (!key_node_data) continue; if (surface) { - krt->HardKeys[i].pic_off_ptr = eina_list_remove_list(krt->HardKeys[i].pic_off_ptr, l); - E_FREE(key_node_data); + if (surface == key_node_data->surface) + { + krt->HardKeys[i].pic_off_ptr = eina_list_remove_list(krt->HardKeys[i].pic_off_ptr, l); + E_FREE(key_node_data); + } } else if ( wc == key_node_data->wc) {