Mercurial > pidgin
changeset 18552:2f99cf09d912
aim_locate_finduserinfo() can return NUL (particularly if userinfo->sn is NULL), which leads to the crash in AdiumTicket:7346. Handle this possibility rather than crashing.
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Mon, 16 Jul 2007 21:11:45 +0000 |
parents | d5cf2c466e9a |
children | 9816af55f45c 7d6f247f08d9 |
files | libpurple/protocols/oscar/family_locate.c |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_locate.c Mon Jul 16 21:11:23 2007 +0000 +++ b/libpurple/protocols/oscar/family_locate.c Mon Jul 16 21:11:45 2007 +0000 @@ -1264,10 +1264,13 @@ * this buddy's info explicitly, then notify them that we have info * for this buddy. */ - was_explicit = aim_locate_gotuserinfo(od, conn, userinfo2->sn); - if (was_explicit == TRUE) - if ((userfunc = aim_callhandler(od, snac->family, snac->subtype))) - ret = userfunc(od, conn, frame, userinfo2); + if (userinfo2 != NULL) + { + was_explicit = aim_locate_gotuserinfo(od, conn, userinfo2->sn); + if (was_explicit == TRUE) + if ((userfunc = aim_callhandler(od, snac->family, snac->subtype))) + ret = userfunc(od, conn, frame, userinfo2); + } return ret; }