changeset 26006:0baeafee93be

Gracefully handle missing the fsrtpconference GStreamer plugin.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Sun, 31 Aug 2008 21:20:05 +0000
parents 5c30047f960e
children 943a09762d95
files libpurple/mediamanager.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/mediamanager.c	Thu Aug 28 04:57:30 2008 +0000
+++ b/libpurple/mediamanager.c	Sun Aug 31 21:20:05 2008 +0000
@@ -27,6 +27,7 @@
 #include "internal.h"
 
 #include "connection.h"
+#include "debug.h"
 #include "marshallers.h"
 #include "mediamanager.h"
 #include "media.h"
@@ -145,6 +146,14 @@
 	GstStateChangeReturn ret;
 	gboolean signal_ret;
 
+	if (conference == NULL) {
+		purple_conv_present_error(remote_user,
+					  purple_connection_get_account(gc),
+					  _("Error creating conference."));
+		purple_debug_error("media", "Conference == NULL\n");
+		return NULL;
+	}
+
 	media = PURPLE_MEDIA(g_object_new(purple_media_get_type(),
 			     "screenname", remote_user,
 			     "connection", gc, 
@@ -157,6 +166,7 @@
 		purple_conv_present_error(remote_user,
 					  purple_connection_get_account(gc),
 					  _("Error creating conference."));
+		purple_debug_error("media", "Failed to start conference.\n");
 		g_object_unref(media);
 		return NULL;
 	}