[gnome-builder/wip/completion-words] action: fix reference counts on variant objects.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/completion-words] action: fix reference counts on variant objects.
- Date: Sat, 11 Oct 2014 19:48:50 +0000 (UTC)
commit 5a002bdabab3faeaad78da3a45d34e88be91dfa5
Author: Christian Hergert <christian hergert me>
Date: Sat Oct 11 15:48:39 2014 -0400
action: fix reference counts on variant objects.
src/commands/gb-command-gaction-provider.c | 3 ++-
src/editor/gb-editor-tab.c | 1 -
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/commands/gb-command-gaction-provider.c b/src/commands/gb-command-gaction-provider.c
index d8d235a..4559a37 100644
--- a/src/commands/gb-command-gaction-provider.c
+++ b/src/commands/gb-command-gaction-provider.c
@@ -178,7 +178,8 @@ gb_command_gaction_provider_lookup (GbCommandProvider *provider,
command = gb_command_new ();
if (parameters)
g_object_set_data_full (G_OBJECT (command), "parameters",
- parameters, (GDestroyNotify)g_variant_unref);
+ g_variant_ref (parameters),
+ (GDestroyNotify)g_variant_unref);
g_object_set_data_full (G_OBJECT (command), "action",
g_object_ref (action), g_object_unref);
g_signal_connect (command, "execute", G_CALLBACK (execute_action), NULL);
diff --git a/src/editor/gb-editor-tab.c b/src/editor/gb-editor-tab.c
index 8a10b76..a0cafcf 100644
--- a/src/editor/gb-editor-tab.c
+++ b/src/editor/gb-editor-tab.c
@@ -1043,7 +1043,6 @@ on_vim_command_visibility_toggled (GbEditorVim *vim,
params = g_variant_new_boolean (visible);
g_action_activate (action, params);
- g_variant_unref (params);
EXIT;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]