libnm-glib: protect against potentially NULL changed property values (rh #808784)

No idea *why* they're NULL, unless perhaps that dbus-glib can't demarshal
the variants for some reason, but until we know why at least log the
problem so we know what properties the issue might affect.
This commit is contained in:
Dan Williams 2012-04-23 14:30:42 -05:00
parent 494f0a2e20
commit 411cb36344

View file

@ -844,8 +844,14 @@ process_properties_changed (NMObject *self, GHashTable *properties, gboolean syn
return;
g_hash_table_iter_init (&iter, properties);
while (g_hash_table_iter_next (&iter, &name, &value))
handle_property_changed (self, name, value, synchronously);
while (g_hash_table_iter_next (&iter, &name, &value)) {
if (value)
handle_property_changed (self, name, value, synchronously);
else {
g_warning ("%s:%d %s(): object %s property '%s' value is unexpectedly NULL",
__FILE__, __LINE__, __func__, G_OBJECT_TYPE_NAME (self), (const char *) name);
}
}
}
static void