[farsight2/master] avoid bug if we can't create a new session

Youness Alaoui youness.alaoui at collabora.co.uk
Tue Jul 14 09:50:30 PDT 2009


---
 gst/fsmsnconference/fs-msn-session.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/gst/fsmsnconference/fs-msn-session.c b/gst/fsmsnconference/fs-msn-session.c
index 2d4ddbe..af5f566 100644
--- a/gst/fsmsnconference/fs-msn-session.c
+++ b/gst/fsmsnconference/fs-msn-session.c
@@ -432,7 +432,12 @@ fs_msn_session_new (FsMediaType media_type,
       "id", id,
       NULL);
 
-  if (session->priv->construction_error)
+  if (!session)
+  {
+    self->priv->construction_error = g_error_new (FS_ERROR,
+        FS_ERROR_CONSTRUCTION, "Could not create object");
+  }
+  else if (session->priv->construction_error)
   {
     g_propagate_error (error, session->priv->construction_error);
     g_object_unref (session);
-- 
1.5.6.5




More information about the farsight-commits mailing list