summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-30 01:42:15 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-30 01:42:15 +0900
commit67246cddcb8559d47d18134b7eb3468046846fd5 (patch)
tree48fd0887fda5a52f5259e3ba864ca83b969abde1
parent085623006d172d07c2eec0694845b564d8de3f12 (diff)
ecore imf - ibus - fix destroy/disconnect handling that crashes
restart e or have ibus input get destroyed and come back... the ibus module will do bad things to its pants... because the wrong things were passed to the signal callbacks... this fixers that along with ensuring a freed string ptr is NULL. @fix
-rw-r--r--src/modules/ecore_imf/ibus/ibus_imcontext.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/ecore_imf/ibus/ibus_imcontext.c b/src/modules/ecore_imf/ibus/ibus_imcontext.c
index 40c9b6c6b3..9ed2501800 100644
--- a/src/modules/ecore_imf/ibus/ibus_imcontext.c
+++ b/src/modules/ecore_imf/ibus/ibus_imcontext.c
@@ -338,7 +338,7 @@ ecore_imf_context_ibus_add(Ecore_IMF_Context *ctx)
338 if (ibus_bus_is_connected(_bus)) 338 if (ibus_bus_is_connected(_bus))
339 _ecore_imf_context_ibus_create(ibusimcontext); 339 _ecore_imf_context_ibus_create(ibusimcontext);
340 340
341 g_signal_connect(_bus, "connected", G_CALLBACK (_ecore_imf_context_ibus_bus_connected_cb), ctx); 341 g_signal_connect(_bus, "connected", G_CALLBACK (_ecore_imf_context_ibus_bus_connected_cb), ibusimcontext);
342} 342}
343 343
344EAPI void 344EAPI void
@@ -353,7 +353,7 @@ ecore_imf_context_ibus_del(Ecore_IMF_Context *ctx)
353 353
354 g_signal_handlers_disconnect_by_func(_bus, 354 g_signal_handlers_disconnect_by_func(_bus,
355 G_CALLBACK(_ecore_imf_context_ibus_bus_connected_cb), 355 G_CALLBACK(_ecore_imf_context_ibus_bus_connected_cb),
356 ctx); 356 ibusimcontext);
357 357
358 if (ibusimcontext->ibuscontext) 358 if (ibusimcontext->ibuscontext)
359 ibus_proxy_destroy((IBusProxy *)ibusimcontext->ibuscontext); 359 ibus_proxy_destroy((IBusProxy *)ibusimcontext->ibuscontext);
@@ -361,6 +361,7 @@ ecore_imf_context_ibus_del(Ecore_IMF_Context *ctx)
361 // release preedit 361 // release preedit
362 if (ibusimcontext->preedit_string) 362 if (ibusimcontext->preedit_string)
363 free(ibusimcontext->preedit_string); 363 free(ibusimcontext->preedit_string);
364 ibusimcontext->preedit_string = NULL;
364 365
365 if (ibusimcontext->preedit_attrs) 366 if (ibusimcontext->preedit_attrs)
366 { 367 {