[farsight2/master] Check if agent making succeeded in fs_nice_agent_new function

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:26:27 PST 2008


---
 transmitters/nice/fs-nice-agent.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/transmitters/nice/fs-nice-agent.c b/transmitters/nice/fs-nice-agent.c
index 9e666d6..14a434d 100644
--- a/transmitters/nice/fs-nice-agent.c
+++ b/transmitters/nice/fs-nice-agent.c
@@ -426,6 +426,14 @@ fs_nice_agent_new (guint compatibility_mode,
       self->priv->main_context,
       self->priv->compatibility_mode);
 
+  if (self->agent == NULL)
+  {
+    g_set_error (error, FS_ERROR, FS_ERROR_INTERNAL,
+        "Could not make nice agent");
+    g_object_unref (self);
+    return NULL;
+  }
+
   if (!fs_nice_agent_init_agent (self, error))
   {
     g_object_unref (self);
-- 
1.5.6.5




More information about the farsight-commits mailing list