mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-06 11:40:32 +01: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
1 changed files with 8 additions and 2 deletions
|
|
@ -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…
Add table
Reference in a new issue