Fix crash issue in case of destroying text input 27/79827/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 13 Jul 2016 06:54:54 +0000 (15:54 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 13 Jul 2016 06:55:56 +0000 (15:55 +0900)
When the focused text input object is deleted, g_text_text should be initialized.

Change-Id: I4b9cef4b7efb6ec7e5b16a9cb9124cb08e1c3f09
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/e_mod_main.c

index 619dfa0c801d766b2b37149c5de361b053405dc8..a4266b131a53467fb7129b0760e176752f80daff 100644 (file)
@@ -1374,10 +1374,15 @@ _e_text_input_cb_destroy(struct wl_resource *resource)
 
    EINA_LIST_FREE(text_input->input_methods, input_method)
      {
-        if (g_text_input == text_input && text_input->input_panel_visibile)
+        if (g_text_input == text_input)
           {
-             if (g_client)
-               _input_panel_hide(g_client, resource, EINA_TRUE);
+              if (text_input->input_panel_visibile)
+                {
+                   if (g_client)
+                     _input_panel_hide(g_client, resource, EINA_TRUE);
+                }
+
+             g_text_input = NULL;
           }
 
         _e_text_input_deactivate(text_input, input_method);