changeset 26033:835a7003eed3

Silence warning.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Fri, 07 Nov 2008 03:30:02 +0000
parents b83c83143a69
children 6260a6192166
files libpurple/protocols/jabber/jingle/rawudp.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jingle/rawudp.c	Fri Nov 07 03:14:10 2008 +0000
+++ b/libpurple/protocols/jabber/jingle/rawudp.c	Fri Nov 07 03:30:02 2008 +0000
@@ -266,7 +266,7 @@
 	JingleTransport *transport = parent_class->parse(rawudp);
 	JingleRawUdpPrivate *priv = JINGLE_RAWUDP_GET_PRIVATE(transport);
 	xmlnode *candidate = xmlnode_get_child(rawudp, "candidate");
-	JingleRawUdpCandidate *rawudp_candidate;
+	JingleRawUdpCandidate *rawudp_candidate = NULL;
 
 	for (; candidate; candidate = xmlnode_get_next_twin(candidate)) {
 		rawudp_candidate = jingle_rawudp_candidate_new(
@@ -278,7 +278,8 @@
 		jingle_rawudp_add_remote_candidate(JINGLE_RAWUDP(transport), rawudp_candidate);
 	}
 
-	if (g_list_length(priv->remote_candidates) == 1) {
+	if (rawudp_candidate != NULL &&
+			g_list_length(priv->remote_candidates) == 1) {
 		/* manufacture rtcp candidate */
 		rawudp_candidate = g_boxed_copy(JINGLE_TYPE_RAWUDP_CANDIDATE, rawudp_candidate);
 		rawudp_candidate->component = 2;