diff libpurple/protocols/irc/parse.c @ 23391:5c70d953a497

propagate from branch 'im.pidgin.pidgin.2.4.3' (head 709ec9c29e9d76eebbded25061107ef0a2a2b148) to branch 'im.pidgin.pidgin' (head e8d624d4b86e9505bb225f2a6e7b29ec6c8affed)
author Richard Laager <rlaager@wiktel.com>
date Thu, 26 Jun 2008 09:07:56 +0000
parents f47438e456c2 106a912f1ef5
children dc359ea9eb9a 28a7992d37b2
line wrap: on
line diff
--- a/libpurple/protocols/irc/parse.c	Thu Jun 26 08:42:49 2008 +0000
+++ b/libpurple/protocols/irc/parse.c	Thu Jun 26 09:07:56 2008 +0000
@@ -232,7 +232,7 @@
 
 	if (encodings[0] == NULL || !g_ascii_strcasecmp("UTF-8", encodings[0])) {
 		g_strfreev(encodings);
-		return g_strdup(string);
+		return NULL;
 	}
 
 	utf8 = g_convert(string, strlen(string), encodings[0], "UTF-8", NULL, NULL, &err);
@@ -597,7 +597,7 @@
 		case 'n':
 		case 'c':
 			tmp = irc_send_convert(irc, tok);
-			g_string_append(string, tmp);
+			g_string_append(string, tmp ? tmp : tok);
 			g_free(tmp);
 			break;
 		default: