KeyRouter: Add destroyed surface check before removing grab mode. 61/75761/4
authorPreshit Agarwal <preshit.p@samsung.com>
Tue, 21 Jun 2016 08:57:43 +0000 (14:27 +0530)
committerSung-Jin Park <sj76.park@samsung.com>
Mon, 27 Jun 2016 04:06:33 +0000 (21:06 -0700)
Change-Id: Ia1e847ab94af5e00cf156572240ac1bc5b255c25
Signed-off-by: Preshit Agarwal <preshit.p@samsung.com>
src/e_mod_keyrouter_list.c

index 4c38454..2ded4ee 100644 (file)
@@ -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)
                {