Delete the timer callback when destroying WSCContextISF pointer 97/147997/1
authorSungmin Kwak <sungmin.kwak@samsung.com>
Wed, 6 Sep 2017 08:17:15 +0000 (17:17 +0900)
committerSungmin Kwak <sungmin.kwak@samsung.com>
Wed, 6 Sep 2017 08:17:15 +0000 (17:17 +0900)
The 2-second timer callback is used to prevent Remote input after Local input.
The pointer parameter to this callback can be invalid if the context is deleted.

Change-Id: I2c63ca6474ab662cdc0a2957afbde1890856e3dc

ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp

index 2f699c6..b0a5e16 100644 (file)
@@ -747,6 +747,10 @@ wl_im_destroy ()
     wsc_ctx->autocapital_type_initialized = EINA_FALSE;
     wsc_ctx->language_initialized = EINA_FALSE;
 
+    if (_resource_check_timer)
+        ecore_timer_del (_resource_check_timer);
+    _resource_check_timer = NULL;
+
     isf_wsc_context_del (wsc_ctx);
     delete wsc_ctx;
     _wl_im_ctx->wsc->wsc_ctx = NULL;