changeset 21751:7632edbf0d00

Fix #4229 by not crashing when there is an invalid group name. There is probably a bug elsewhere that causes this (I'm guessing with the ICQ encoding or something.)
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 03 Dec 2007 21:26:54 +0000
parents fb8ab2490ac4
children 9c2230fe2217
files pidgin/gtkblist.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkblist.c	Mon Dec 03 19:02:28 2007 +0000
+++ b/pidgin/gtkblist.c	Mon Dec 03 21:26:54 2007 +0000
@@ -5715,11 +5715,11 @@
 
 	esc = g_markup_escape_text(group->name, -1);
 	if (selected)
-		mark = g_strdup_printf("<span weight='bold'>%s</span>%s", esc, group_count);
+		mark = g_strdup_printf("<span weight='bold'>%s</span>%s", esc ? esc : "", group_count);
 	else
 		mark = g_strdup_printf("<span color='#%02x%02x%02x' weight='bold'>%s</span>%s",
 				       textcolor.red>>8, textcolor.green>>8, textcolor.blue>>8,
-				       esc, group_count);
+				       esc ? esc : "", group_count);
 
 	g_free(esc);
 	return mark;