changeset 13196:f04dffe22957

[gaim-migrate @ 15559] This fixes the GaimPluginAction crash/not working. We were freeing the data that we were using in the a I haven't leak checked this, but it _should_ be alright.. committer: Tailor Script <tailor@pidgin.im>
author Gary Kramlich <grim@reaperworld.com>
date Thu, 09 Feb 2006 00:14:40 +0000
parents c242836ff793
children 22f8ed4e5294
files src/gtkblist.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkblist.c	Thu Feb 09 00:10:12 2006 +0000
+++ b/src/gtkblist.c	Thu Feb 09 00:14:40 2006 +0000
@@ -5446,9 +5446,9 @@
 #endif
 
 static void
-plugin_act(GtkObject *obk, GaimPluginAction *pam)
+plugin_act(GtkObject *obj, GaimPluginAction *pam)
 {
-	if (pam->callback)
+	if (pam && pam->callback)
 		pam->callback(pam);
 }
 
@@ -5474,10 +5474,10 @@
 
 			g_signal_connect(G_OBJECT(menuitem), "activate",
 					G_CALLBACK(plugin_act), action);
-			g_object_set_data(G_OBJECT(menuitem), "plugin_action", action);
+			g_object_set_data_full(G_OBJECT(menuitem), "plugin_action",
+								   action,
+								   (GDestroyNotify)gaim_plugin_action_free);
 			gtk_widget_show(menuitem);
-
-			gaim_plugin_action_free(action);
 		}
 		else
 			gaim_separator(menu);