[gaim-migrate @ 15559]

Thu, 09 Feb 2006 00:14:40 +0000

author
Gary Kramlich <grim@reaperworld.com>
date
Thu, 09 Feb 2006 00:14:40 +0000
changeset 13197
734f8ef469b8
parent 13196
b34319a69167
child 13198
208f0e50ff0f

[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..

src/gtkblist.c file | annotate | diff | comparison | revisions
--- 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);

mercurial