Make sure the engine was not destroyed before real set the global
authorPeng Huang <shawn.p.huang@gmail.com>
Wed, 10 Feb 2010 06:52:01 +0000 (14:52 +0800)
committerPeng Huang <shawn.p.huang@gmail.com>
Sat, 20 Feb 2010 02:43:13 +0000 (10:43 +0800)
engine.

bus/ibusimpl.c

index 050d734e3e2f54561fcd98a6e0bdf0b69a8301e4..d5d2558c0dbd05a497187bcef3d8780209f18287 100644 (file)
@@ -898,7 +898,7 @@ bus_ibus_impl_set_global_engine (BusIBusImpl    *ibus,
         g_assert (ibus->global_engine == NULL);
     }
 
-    if (engine != NULL) {
+    if (engine != NULL && !IBUS_OBJECT_DESTROYED (engine)) {
         g_object_ref (engine);
         ibus->global_engine = engine;
         g_signal_connect (ibus->global_engine, "destroy",