[glib] Fix an assertion when activating apps a second time
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Fix an assertion when activating apps a second time
- Date: Sun, 11 Dec 2011 17:06:23 +0000 (UTC)
commit 840482658a7cdacd012df6edba78edf7f7862036
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Dec 11 12:05:23 2011 -0500
Fix an assertion when activating apps a second time
This was causing the following critical when running bloatpad twice:
GLib-CRITICAL **: g_hash_table_insert_internal: assertion `hash_table != NULL' failed
gio/gdbusactiongroup.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gio/gdbusactiongroup.c b/gio/gdbusactiongroup.c
index e7c9463..d84e239 100644
--- a/gio/gdbusactiongroup.c
+++ b/gio/gdbusactiongroup.c
@@ -494,6 +494,9 @@ g_dbus_action_group_sync (GDBusActionGroup *group,
GVariantIter *iter;
ActionInfo *action;
+ g_assert (group->actions == NULL);
+ group->actions = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, action_info_free);
+
g_variant_get (reply, "(a{s(bgav)})", &iter);
while ((action = action_info_new_from_iter (iter)))
g_hash_table_insert (group->actions, action->name, action);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]