Mercurial > pidgin
diff libgaim/protocols/msn/msn.c @ 15283:c2f15e2117dc
[gaim-migrate @ 18073]
gaim_xfer_new() can return NULL via g_return_if_fail(). It should therefore not be assumed that it returns a GaimXfer; check against its return value before proceeding when creating a GaimXfer.
committer: Tailor Script <tailor@pidgin.im>
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Thu, 04 Jan 2007 23:20:12 +0000 |
parents | 4bf7801a2539 |
children | e354528c4163 |
line wrap: on
line diff
--- a/libgaim/protocols/msn/msn.c Thu Jan 04 19:21:10 2007 +0000 +++ b/libgaim/protocols/msn/msn.c Thu Jan 04 23:20:12 2007 +0000 @@ -428,12 +428,14 @@ session = gc->proto_data; xfer = gaim_xfer_new(gc->account, GAIM_XFER_SEND, who); - - slplink = msn_session_get_slplink(session, who); + if (xfer) + { + slplink = msn_session_get_slplink(session, who); - xfer->data = slplink; + xfer->data = slplink; - gaim_xfer_set_init_fnc(xfer, t_msn_xfer_init); + gaim_xfer_set_init_fnc(xfer, t_msn_xfer_init); + } return xfer; }