From a5bc4b13cbc22baecb41836e643abdc9e2faeaf2 Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Sat, 4 Apr 2009 13:28:08 +0800 Subject: [PATCH] Fix crash when engine is destroyed. --- src/ibusfactory.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/ibusfactory.c b/src/ibusfactory.c index af26b57..f0066bd 100644 --- a/src/ibusfactory.c +++ b/src/ibusfactory.c @@ -169,16 +169,11 @@ static void _engine_destroy_cb (IBusEngine *engine, IBusFactory *factory) { - GList *list; IBusFactoryPrivate *priv; priv = IBUS_FACTORY_GET_PRIVATE (factory); - list = g_list_remove (priv->engine_list, engine); - - if (list) { - g_object_unref (engine); - g_list_free_1 (list); - } + priv->engine_list = g_list_remove (priv->engine_list, engine); + g_object_unref (engine); } static gboolean -- 2.7.4