[telepathy-mission-control/master] mcd_dispatcher_run_observers: allocate and free an empty observer_info hash table
Simon McVittie
simon.mcvittie at collabora.co.uk
Wed Apr 1 06:17:18 PDT 2009
It is incorrect to pass NULL to dbus-glib when a GHashTable is
expected; a critical warning inside GLib is the result.
---
src/mcd-dispatcher.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index 1b8be08..5ac0fbc 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -1371,7 +1371,7 @@ mcd_dispatcher_run_observers (McdDispatcherContext *context)
sp_timestamp ("run observers");
channels = context->channels;
- observer_info = NULL;
+ observer_info = g_hash_table_new (g_str_hash, g_str_equal);
g_hash_table_iter_init (&iter, priv->clients);
while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &client))
@@ -1420,6 +1420,8 @@ mcd_dispatcher_run_observers (McdDispatcherContext *context)
g_list_free (observed);
}
+
+ g_hash_table_destroy (observer_info);
}
/*
--
1.5.6.5
More information about the telepathy-commits
mailing list