[farsight2/master] Don't unset the main context..

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


---
 fs-upnp-simple-igd.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs-upnp-simple-igd.c b/fs-upnp-simple-igd.c
index dd0f5cd..aa1c36d 100644
--- a/fs-upnp-simple-igd.c
+++ b/fs-upnp-simple-igd.c
@@ -371,9 +371,11 @@ fs_upnp_simple_igd_set_property (GObject *object, guint prop_id,
       self->priv->request_timeout = g_value_get_uint (value);
       break;
     case PROP_MAIN_CONTEXT:
-      self->priv->main_context = g_value_get_pointer (value);
-      if (self->priv->main_context)
+      if (!self->priv->main_context && g_value_get_pointer (value))
+      {
+        self->priv->main_context = g_value_get_pointer (value);
         g_main_context_ref (self->priv->main_context);
+      }
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-- 
1.5.6.5




More information about the farsight-commits mailing list