pidgin: 2ce20c5c: irc: Avoid a g_log error when parting a ...

sadrul at pidgin.im sadrul at pidgin.im
Thu Feb 4 00:45:39 EST 2010


-----------------------------------------------------------------
Revision: 2ce20c5c040fe58d5fae4958c988af81cb299852
Ancestor: 1db3debff58b6c25ed54db5d39b49a8469d9c98d
Author: sadrul at pidgin.im
Date: 2010-02-03T16:38:32
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/2ce20c5c040fe58d5fae4958c988af81cb299852

Modified files:
        libpurple/protocols/irc/msgs.c

ChangeLog: 

irc: Avoid a g_log error when parting a chatroom.

-------------- next part --------------
============================================================
--- libpurple/protocols/irc/msgs.c	0024a6dcc2616a7166e697a15ad23cbd844846f5
+++ libpurple/protocols/irc/msgs.c	c972007b3d9f0e0344b7580ddf3b87f8582fd6e9
@@ -1069,7 +1069,7 @@ void irc_msg_part(struct irc_conn *irc, 
 
 	nick = irc_mask_nick(from);
 	if (!purple_utf8_strcasecmp(nick, purple_connection_get_display_name(gc))) {
-		char *escaped = g_markup_escape_text(args[1], -1);
+		char *escaped = args[1] ? g_markup_escape_text(args[1], -1) : NULL;
 		msg = g_strdup_printf(_("You have parted the channel%s%s"),
 		                      (args[1] && *args[1]) ? ": " : "",
 		                      (escaped && *escaped) ? escaped : "");


More information about the Commits mailing list