Mercurial > pidgin.yaz
changeset 24355:63558ea6fac6
It's an error if purple_xfer_new fails, so use a g_return_val_if_fail
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 14 Nov 2008 07:23:56 +0000 |
parents | 157bcca38f4c |
children | a3523b143f78 |
files | libpurple/protocols/msn/msn.c |
diffstat | 1 files changed, 5 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c Fri Nov 14 06:57:56 2008 +0000 +++ b/libpurple/protocols/msn/msn.c Fri Nov 14 07:23:56 2008 +0000 @@ -550,21 +550,17 @@ msn_new_xfer(PurpleConnection *gc, const char *who) { MsnSession *session; - MsnSlpLink *slplink; PurpleXfer *xfer; session = gc->proto_data; xfer = purple_xfer_new(gc->account, PURPLE_XFER_SEND, who); - if (xfer) - { - slplink = msn_session_get_slplink(session, who); - - xfer->data = slplink; - - purple_xfer_set_init_fnc(xfer, t_msn_xfer_init); - } + g_return_val_if_fail(xfer != NULL, NULL); + + xfer->data = msn_session_get_slplink(session, who); + + purple_xfer_set_init_fnc(xfer, t_msn_xfer_init); return xfer; }