# HG changeset patch # User Elliott Sales de Andrade # Date 1217564916 0 # Node ID 7a71457cdd327f7e956a0535a8835fab3c6f8720 # Parent 24f6212d19960e88f148f1b8424118b01ecf20df Don't crash if MsnSession is NULL when checking for ability to send a file to a buddy. diff -r 24f6212d1996 -r 7a71457cdd32 libpurple/protocols/msn/msn.c --- a/libpurple/protocols/msn/msn.c Fri Aug 01 04:06:42 2008 +0000 +++ b/libpurple/protocols/msn/msn.c Fri Aug 01 04:28:36 2008 +0000 @@ -594,10 +594,13 @@ if (ret) { MsnSession *session = gc->proto_data; - MsnUser *user = msn_userlist_find_user(session->userlist, who); - if (user) - ret = (user->clientid & MSN_CLIENT_CAP_WEBMSGR) == 0; - /* Include these too: MSN_CLIENT_CAP_MSNMOBILE|MSN_CLIENT_CAP_MSNDIRECT ? */ + if (session) { + MsnUser *user = msn_userlist_find_user(session->userlist, who); + if (user) + /* Include these too: MSN_CLIENT_CAP_MSNMOBILE|MSN_CLIENT_CAP_MSNDIRECT ? */ + ret = (user->clientid & MSN_CLIENT_CAP_WEBMSGR) == 0; + } else + ret = FALSE; } return ret;