changeset 26037:403453f8b643

Fix a few GLib warnings when trying to start a second media session.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Thu, 13 Nov 2008 04:00:29 +0000
parents a5f1804fcb4b
children aa50b1f05145
files libpurple/protocols/jabber/jingle/rtp.c
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jingle/rtp.c	Thu Nov 13 03:46:28 2008 +0000
+++ b/libpurple/protocols/jabber/jingle/rtp.c	Thu Nov 13 04:00:29 2008 +0000
@@ -623,6 +623,7 @@
 	JingleTransport *transport;
 	JabberBuddy *jb;
 	JabberBuddyResource *jbr;
+	PurpleMedia *media;
 	
 	gchar *jid = NULL, *me = NULL, *sid = NULL;
 
@@ -668,13 +669,17 @@
 		jingle_rtp_init_media(content);
 	}
 
-	purple_media_ready(jingle_rtp_get_media(session));
-	purple_media_wait(jingle_rtp_get_media(session));
+	if ((media = jingle_rtp_get_media(session)) == NULL) {
+		return NULL;
+	}
+
+	purple_media_ready(media);
+	purple_media_wait(media);
 
 	g_free(jid);
 	g_free(me);
 
-	return NULL;
+	return media;
 }
 
 void