diff libpurple/protocols/oscar/oscar.c @ 27732:73ef026191e7

propagate from branch 'im.pidgin.pidgin' (head 8d61a119c53ac77e595d5ec300d30482b914bdf7) to branch 'im.pidgin.pidgin.yaz' (head 456e82d794038f69ba0113eecb77dc8ce0f3d605)
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Tue, 16 Oct 2007 07:48:36 +0000
parents b8d98bc09656 ac36f4a43fec
children bc47a0388c66
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c	Sun Oct 07 03:21:27 2007 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Tue Oct 16 07:48:36 2007 +0000
@@ -1149,8 +1149,10 @@
 	aim_clientready(od, conn);
 
 	chatcon = find_oscar_chat_by_conn(gc, conn);
-	chatcon->id = id;
-	chatcon->conv = serv_got_joined_chat(gc, id++, chatcon->show);
+	if (chatcon) {
+		chatcon->id = id;
+		chatcon->conv = serv_got_joined_chat(gc, id++, chatcon->show);
+	}
 }
 
 static void
@@ -1742,7 +1744,6 @@
 {
 	PurpleConnection *gc;
 	PurpleAccount *account;
-	PurplePresence *presence;
 	struct buddyinfo *bi;
 	time_t time_idle = 0, signon = 0;
 	int type = 0;
@@ -1755,7 +1756,6 @@
 
 	gc = od->gc;
 	account = purple_connection_get_account(gc);
-	presence = purple_account_get_presence(account);
 
 	va_start(ap, fr);
 	info = va_arg(ap, aim_userinfo_t *);
@@ -1822,7 +1822,7 @@
 
 	if (have_status_message)
 	{
-		if ((status_id == OSCAR_STATUS_ID_AVAILABLE) && (info->itmsurl != NULL))
+		if ((!strcmp(status_id, OSCAR_STATUS_ID_AVAILABLE)) && (info->itmsurl != NULL))
 		{
 			char *itmsurl;
 			itmsurl = oscar_encoding_to_utf8(account, info->itmsurl_encoding,
@@ -5033,6 +5033,7 @@
 					g = purple_group_new(gname_utf8);
 					purple_blist_add_group(g, NULL);
 				}
+				g_free(gname_utf8);
 			} break;
 
 			case 0x0002: { /* Permit buddy */