Fix crash when engine is destroyed.

This commit is contained in:
Peng Huang 2009-04-04 13:28:08 +08:00
Родитель 23a12b33ad
Коммит a5bc4b13cb
1 изменённых файлов: 2 добавлений и 7 удалений

Просмотреть файл

@ -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