summaryrefslogtreecommitdiff
path: root/gtk/gtkaction.c
diff options
context:
space:
mode:
authorMichael Natterer <mitch@gimp.org>2012-08-03 23:24:39 +0200
committerMichael Natterer <mitch@gimp.org>2012-08-03 23:28:05 +0200
commit13ad089bdf2ffd7ffe4ff09171b599d125f716aa (patch)
treeb9e54d13d1a75e93e110693d093990722fdaa3ea /gtk/gtkaction.c
parent1c90f6b6c69ba6041e80e8cad9abe95d9e2e8c1b (diff)
downloadgtk+-13ad089bdf2ffd7ffe4ff09171b599d125f716aa.tar.gz
gtk: ref the action around gtk_action_emit_activate()
for the same reason we already ref the action's group in the function. (cherry picked from commit ebe50bbecba1d4797853134add2cb37baa13092e)
Diffstat (limited to 'gtk/gtkaction.c')
-rw-r--r--gtk/gtkaction.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gtk/gtkaction.c b/gtk/gtkaction.c
index fe5336228d..6bb0ae9d7b 100644
--- a/gtk/gtkaction.c
+++ b/gtk/gtkaction.c
@@ -791,18 +791,20 @@ _gtk_action_emit_activate (GtkAction *action)
{
GtkActionGroup *group = action->private_data->action_group;
- if (group != NULL)
+ if (group != NULL)
{
+ g_object_ref (action);
g_object_ref (group);
_gtk_action_group_emit_pre_activate (group, action);
}
- g_signal_emit (action, action_signals[ACTIVATE], 0);
+ g_signal_emit (action, action_signals[ACTIVATE], 0);
- if (group != NULL)
+ if (group != NULL)
{
_gtk_action_group_emit_post_activate (group, action);
g_object_unref (group);
+ g_object_unref (action);
}
}