changeset 26950:9612a2e8db87

Avoid an assertion failure when getting info on an AIM buddy. Thank to zac for pointing this out.
author Paul Aurich <paul@darkrain42.org>
date Mon, 11 May 2009 22:03:46 +0000
parents 0402ec1872dc
children 329f5a43b68a
files libpurple/protocols/oscar/oscar.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c	Sun May 10 23:41:06 2009 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Mon May 11 22:03:46 2009 +0000
@@ -930,7 +930,7 @@
 	PurpleGroup *g = NULL;
 	struct buddyinfo *bi = NULL;
 	char *tmp;
-	const char *bname, *gname = NULL;
+	const char *bname = NULL, *gname = NULL;
 
 	od = purple_connection_get_protocol_data(gc);
 	account = purple_connection_get_account(gc);
@@ -938,14 +938,14 @@
 	if ((user_info == NULL) || ((b == NULL) && (userinfo == NULL)))
 		return;
 
-	bname = purple_buddy_get_name(b);
 	if (userinfo == NULL)
-		userinfo = aim_locate_finduserinfo(od, bname);
+		userinfo = aim_locate_finduserinfo(od, purple_buddy_get_name(b));
 
 	if (b == NULL)
 		b = purple_find_buddy(account, userinfo->bn);
 
 	if (b != NULL) {
+		bname = purple_buddy_get_name(b);
 		g = purple_buddy_get_group(b);
 		gname = purple_group_get_name(g);
 		presence = purple_buddy_get_presence(b);