[gtk+/gtk-2-24] gtk: ref the action around gtk_action_emit_activate()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] gtk: ref the action around gtk_action_emit_activate()
- Date: Fri, 3 Aug 2012 21:27:13 +0000 (UTC)
commit ebe50bbecba1d4797853134add2cb37baa13092e
Author: Michael Natterer <mitch gimp org>
Date: Fri Aug 3 23:24:39 2012 +0200
gtk: ref the action around gtk_action_emit_activate()
for the same reason we already ref the action's group in the function.
gtk/gtkaction.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkaction.c b/gtk/gtkaction.c
index 504e09b..ff4e751 100644
--- a/gtk/gtkaction.c
+++ b/gtk/gtkaction.c
@@ -785,18 +785,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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]