pidgin: 5f56f1df: Don't crash if MsnSession is NULL when c...
qulogic at pidgin.im
qulogic at pidgin.im
Fri Aug 1 01:20:44 EDT 2008
-----------------------------------------------------------------
Revision: 5f56f1df972a614a4e7186caa3dafa35b4b77ab1
Ancestor: 34b47d7799f6c19a4e88fae539cec7821d69207e
Author: qulogic at pidgin.im
Date: 2008-08-01T04:28:36
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/5f56f1df972a614a4e7186caa3dafa35b4b77ab1
Modified files:
libpurple/protocols/msn/msn.c
ChangeLog:
Don't crash if MsnSession is NULL when checking for ability to send a
file to a buddy.
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msn.c d11acc540bbc70d3952ecbe1dec864a578f0fe0f
+++ libpurple/protocols/msn/msn.c 8ef4091a0f26c1272c06ce6215f89bd0489bf8db
@@ -594,10 +594,13 @@ msn_can_receive_file(PurpleConnection *g
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;
More information about the Commits
mailing list