ecore_imf: avoid crash during shutdown due to Ecore_Event queue. 28/118328/2
authorCedric BAIL <cedric@osg.samsung.com>
Fri, 10 Mar 2017 00:11:19 +0000 (16:11 -0800)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Thu, 6 Jul 2017 04:46:43 +0000 (04:46 +0000)
Change-Id: I7f461fa49d30ea300b6d03f3d09be1ac1beced2e
Signed-off-by: Jiwon Kim <jiwon177.kim@samsung.com>
src/lib/ecore_imf/ecore_imf.c

index 0f5b75f..5b5da17 100644 (file)
@@ -47,6 +47,13 @@ EAPI int
 ecore_imf_shutdown(void)
 {
    if (--_ecore_imf_init_count != 0) return _ecore_imf_init_count;
+
+   ecore_event_type_flush(ECORE_IMF_EVENT_PREEDIT_START,
+                          ECORE_IMF_EVENT_PREEDIT_END,
+                          ECORE_IMF_EVENT_PREEDIT_CHANGED,
+                          ECORE_IMF_EVENT_COMMIT,
+                          ECORE_IMF_EVENT_DELETE_SURROUNDING);
+
    ecore_imf_module_shutdown();
    eina_log_domain_unregister(_ecore_imf_log_dom);
    _ecore_imf_log_dom = -1;