changeset 28965:0278f0e28504

irc: Avoid a g_log error when parting a chatroom.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 03 Feb 2010 16:38:32 +0000
parents 7b6933cd7fd3
children f59dd3e9875d
files libpurple/protocols/irc/msgs.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/irc/msgs.c	Wed Feb 03 16:05:28 2010 +0000
+++ b/libpurple/protocols/irc/msgs.c	Wed Feb 03 16:38:32 2010 +0000
@@ -1069,7 +1069,7 @@
 
 	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 : "");