mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-23 19:24:38 +00:00
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:
parent
494f0a2e20
commit
411cb36344
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue