changeset 23946:169c1451b7e5

Don't crash if user == NULL in a couple more places. Not exactly the real cause, but fixes #6777.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Tue, 26 Aug 2008 02:24:17 +0000
parents 60de5d1ee482
children 4ecea8ae3d21
files libpurple/protocols/msn/user.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/user.c	Thu Aug 21 06:46:19 2008 +0000
+++ b/libpurple/protocols/msn/user.c	Tue Aug 26 02:24:17 2008 +0000
@@ -84,6 +84,8 @@
 	PurpleAccount *account;
 	gboolean offline;
 
+	g_return_if_fail(user != NULL);
+
 	account = user->userlist->session->account;
 
 	offline = (user->status == NULL);
@@ -125,6 +127,8 @@
 {
 	const char *status;
 
+	g_return_if_fail(user != NULL);
+
 	if (state == NULL) {
 		user->status = NULL;
 		return;
@@ -282,7 +286,7 @@
 {
 	PurpleBuddy *buddy;
 
-	buddy =purple_find_buddy(account,name);
+	buddy = purple_find_buddy(account, name);
 	return PURPLE_BUDDY_IS_ONLINE(buddy);
 }