changeset 31583:5a6c5a4f1aea

Let's not fool anyone here. The slplink is never NULL.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 09 May 2011 22:50:05 +0000
parents 02d9a66656cb
children cf702c6ab9e7
files libpurple/protocols/msn/slpmsg.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/slpmsg.c	Mon May 09 22:20:56 2011 +0000
+++ b/libpurple/protocols/msn/slpmsg.c	Mon May 09 22:50:05 2011 +0000
@@ -39,15 +39,14 @@
 	MsnSlpMessage *slpmsg;
 	MsnP2PVersion p2p;
 
+	g_return_val_if_fail(slplink != NULL, NULL);
+
 	slpmsg = g_new0(MsnSlpMessage, 1);
 
 	if (purple_debug_is_verbose())
 		purple_debug_info("msn", "slpmsg new (%p)\n", slpmsg);
 
-	if (slplink)
-		msn_slpmsg_set_slplink(slpmsg, slplink);
-	else
-		slpmsg->slplink = NULL;
+	msn_slpmsg_set_slplink(slpmsg, slplink);
 	slpmsg->slpcall = slpcall;
 
 	p2p = msn_p2p_get_user_support(slplink->remote_user);