Mercurial > pidgin
diff libpurple/protocols/msn/user.c @ 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 | aaaff38e144f |
children | e344426d7c28 16734635febf 8d562557ed6f |
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); }