org.guifications.plugins: 628608624b1a2e6b586be884259d8fc9fa89b218

rekkanoryo at guifications.org rekkanoryo at guifications.org
Fri Apr 11 16:35:09 CDT 2008


-----------------------------------------------------------------
Revision: 628608624b1a2e6b586be884259d8fc9fa89b218
Ancestor: 5a564229fe626ac550b7b674ac34e6a6c40f7f00
Author: rekkanoryo at guifications.org
Date: 2008-04-11T21:28:44
Branch: org.guifications.plugins

Modified files:
        irc-more/irc-more.c

ChangeLog: 

This should prevent crashes when the conversation associated with a channel
the user is kicked from no longer exists when the timeout's callback fires.
Fixes Pidgin ticket 5490.

-----------------------------------------------------------------
This revision's diffstat output:
 irc-more.c |   19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
-------------- next part --------------
============================================================
--- irc-more/irc-more.c	b6c4bd5926b7a9dcee56253dacda50580060270d
+++ irc-more/irc-more.c	92f225b80ec7fe07d6b337dc78a92399c6756b22
@@ -51,13 +51,18 @@ show_them(gpointer data)
 {
 	/* So you think you can kick me? I'll show you! */
 	PurpleConversation *conv = data;
-	char *command = g_strdup_printf("join %s", purple_conversation_get_name(conv));
-	char *markup = g_markup_escape_text(command, -1);
-	char *error = NULL;
-	purple_cmd_do_command(conv, command, markup, &error);  /* Do anything with the return value? */
-	g_free(command);
-	g_free(markup);
-	g_free(error);
+	char *conv_name = NULL, *command = NULL, *markup = NULL, *error = NULL;
+
+	if(conv_name) {
+		*command = g_strdup_printf("join %s", conv_name);
+		*markup = g_markup_escape_text(command, -1);
+		*error = NULL;
+		purple_cmd_do_command(conv, command, markup, &error);  /* Do anything with the return value? */
+		g_free(command);
+		g_free(markup);
+		g_free(error);
+	}
+
 	return FALSE;
 }
 


More information about the Plugins-commits mailing list