libnm-glib: fix demarshalling of Dhcp6Config property changes
authorDan Williams <dcbw@redhat.com>
Sat, 18 Jun 2011 22:16:48 +0000 (17:16 -0500)
committerDan Williams <dcbw@redhat.com>
Sat, 18 Jun 2011 22:16:48 +0000 (17:16 -0500)
This bit apparently got forgotten in 10ea7a911ce66c8f70eb811b61c9c75682df541c

libnm-glib/nm-device.c

index 9ac6fe3..664c115 100644 (file)
@@ -228,12 +228,10 @@ demarshal_dhcp6_config (NMObject *object, GParamSpec *pspec, GValue *value, gpoi
        NMDHCP6Config *config = NULL;
        DBusGConnection *connection;
 
-       if (!G_VALUE_HOLDS (value, DBUS_TYPE_G_OBJECT_PATH))
-               return FALSE;
-
-       priv->got_dhcp6_config = TRUE;
-
        if (value) {
+               if (!G_VALUE_HOLDS (value, DBUS_TYPE_G_OBJECT_PATH))
+                       return FALSE;
+
                path = g_value_get_boxed (value);
                if (path) {
                        config = NM_DHCP6_CONFIG (_nm_object_cache_get (path));
@@ -244,6 +242,8 @@ demarshal_dhcp6_config (NMObject *object, GParamSpec *pspec, GValue *value, gpoi
                }
        }
 
+       priv->got_dhcp6_config = TRUE;
+
        if (priv->dhcp6_config) {
                g_object_unref (priv->dhcp6_config);
                priv->dhcp6_config = NULL;