[gaim-migrate @ 10478]

Sun, 01 Aug 2004 18:31:28 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Sun, 01 Aug 2004 18:31:28 +0000
changeset 9634
166f3ac40f4a
parent 9633
52d87acba1d1
child 9635
4f705de0334c

[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.

src/protocols/oscar/oscar.c file | annotate | diff | comparison | revisions
--- 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);

mercurial