changeset 9634:10f1d729c415

[gaim-migrate @ 10478] Fix a bug Kevin pointed out where Gaim would crash when getting info of an ICQ buddy not on your buddy list. My bad. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 01 Aug 2004 18:31:28 +0000
parents 81b31af2752d
children 8ad07c6f6522
files src/protocols/oscar/oscar.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Sun Aug 01 17:12:13 2004 +0000
+++ b/src/protocols/oscar/oscar.c	Sun Aug 01 18:31:28 2004 +0000
@@ -4818,6 +4818,7 @@
 	gchar who[16];
 	GString *str;
 	gchar *primary, *utf8;
+	const gchar *alias;
 	va_list ap;
 	struct aim_icq_info *info;
 
@@ -4914,7 +4915,11 @@
 		g_string_append_printf(str, "\n<hr>\n");
 	}
 
-	primary = g_strdup_printf(_("ICQ Info for %s"), gaim_buddy_get_alias(buddy));
+	if (buddy != NULL)
+		alias = gaim_buddy_get_alias(buddy);
+	else
+		alias = who;
+	primary = g_strdup_printf(_("ICQ Info for %s"), alias);
 	gaim_notify_formatted(gc, NULL, primary, NULL, str->str, NULL, NULL);
 	g_free(primary);
 	g_string_free(str, TRUE);