# HG changeset patch # User Mark Doliner # Date 1226647436 0 # Node ID 63558ea6fac69def6676f03edec43d183f393057 # Parent 157bcca38f4cfbaccfaf87c32c3c4f53fa691261 It's an error if purple_xfer_new fails, so use a g_return_val_if_fail diff -r 157bcca38f4c -r 63558ea6fac6 libpurple/protocols/msn/msn.c --- 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; }