Fix crash issue when wl_im_ctx is deleted 99/223699/1
authorInHong Han <inhong1.han@samsung.com>
Mon, 3 Feb 2020 06:08:02 +0000 (15:08 +0900)
committerInHong Han <inhong1.han@samsung.com>
Mon, 3 Feb 2020 06:08:02 +0000 (15:08 +0900)
Change-Id: Ia87e448ee64a46987a6cf41b59233302dad49e5b

ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp

index b09d1c9..016b223 100644 (file)
@@ -871,14 +871,19 @@ _wsc_im_deactivate (void *data, struct wl_input_method *input_method, struct wl_
         _wl_im_ctx->need_focus_event = EINA_FALSE;
     }
     wsc->wsc_ctx->input_panel_shown_once = EINA_FALSE;
-
-    if (_launch_ise_on_request)
-        wl_im_destroy ();
 }
 
 static void
 _wsc_im_destroy (void *data, struct wl_input_method *input_method, struct wl_input_method_context *im_ctx)
 {
+    struct weescim *wsc = (weescim*)data;
+    if (!wsc || !wsc->wsc_ctx) return;
+
+    _wl_im_ctx->wsc = wsc;
+    _wl_im_ctx->input_method = input_method;
+    _wl_im_ctx->im_ctx = im_ctx;
+
+    wl_im_destroy ();
 }
 
 static void