Fix illegal wl_resource_destroy. 90/39590/1
authorMun, Gwan-gyeong <kk.moon@samsung.com>
Tue, 19 May 2015 07:51:24 +0000 (16:51 +0900)
committerMun, Gwan-gyeong <kk.moon@samsung.com>
Tue, 19 May 2015 07:51:24 +0000 (16:51 +0900)
Fix call wl_resource_post_event on destroyed wl_resource.

Change-Id: I082af1f4f32aae240c2f2829fa17ac2c44cf2022

src/e_mod_input_panel.c
src/e_mod_main.c

index d8cadfa..5d2a528 100644 (file)
@@ -134,6 +134,8 @@ _e_input_panel_surface_visible_update(E_Input_Panel_Surface *ips)
 
    if (!(ec = ips->ec)) return;
 
+   if (e_object_is_del(E_OBJECT(ec))) return;
+
    if ((ips->showing) && (e_pixmap_usable_get(ec->pixmap)))
      {
         _e_input_panel_position_set(ec, ec->client.w, ec->client.h);
@@ -239,6 +241,8 @@ _e_input_panel_surface_unmap(struct wl_resource *resource)
         return;
      }
 
+   if (e_object_is_del(E_OBJECT(ec))) return;
+
    if (ec->comp_data->mapped)
      {
         ec->visible = EINA_FALSE;
@@ -381,7 +385,7 @@ _e_input_panel_unbind(struct wl_resource *resource)
         if (!(ec = ips->ec)) continue;
         if (!(cdata = ec->comp_data)) continue;
 
-        wl_resource_destroy(cdata->shell.surface);
+        cdata->shell.surface = NULL;
      }
 
    E_FREE_FUNC(input_panel->surfaces, eina_list_free);
index 421e695..a21969c 100644 (file)
@@ -345,6 +345,7 @@ _e_text_input_deactivate(E_Text_Input *text_input, E_Input_Method *input_method)
           }
 
         input_method->model = NULL;
+        if (input_method->context) input_method->context->model = NULL;
         input_method->context = NULL;
 
         text_input->input_methods = eina_list_remove(text_input->input_methods, input_method);