From: JengHyun Kang Date: Thu, 28 Apr 2016 23:45:52 +0000 (+0900) Subject: Do not add destroy listener if client or surface is null X-Git-Tag: submit/tizen/20160428.235112^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F65%2F67865%2F1;p=platform%2Fcore%2Fuifw%2Fe-mod-tizen-keyrouter.git Do not add destroy listener if client or surface is null Change-Id: If6b1ad347edba1e495d1a50db32acf4b40fcd598 --- diff --git a/src/e_mod_main_wl.c b/src/e_mod_main_wl.c index 9d918fb..d4dab8f 100644 --- a/src/e_mod_main_wl.c +++ b/src/e_mod_main_wl.c @@ -262,6 +262,8 @@ e_keyrouter_add_client_destroy_listener(struct wl_client *client) Eina_List *l; struct wl_client *wc_data; + if (!client) return TIZEN_KEYROUTER_ERROR_NONE; + EINA_LIST_FOREACH(krt->grab_client_list, l, wc_data) { if (wc_data) @@ -296,6 +298,8 @@ e_keyrouter_add_surface_destroy_listener(struct wl_resource *surface) Eina_List *l; struct wl_resource *surface_data; + if (!surface) return TIZEN_KEYROUTER_ERROR_NONE; + EINA_LIST_FOREACH(krt->grab_surface_list, l, surface_data) { if (surface_data)