mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
gnetworkmonitornm: Prevent crash
g_dbus_proxy_get_cached_property_names can return NULL if there are no cached properties, so don't try to access them in that case.
This commit is contained in:
parent
aa4e2d4dc3
commit
327d35ed41
@ -219,6 +219,10 @@ has_property (GDBusProxy *proxy,
|
||||
gboolean prop_found = FALSE;
|
||||
|
||||
props = g_dbus_proxy_get_cached_property_names (proxy);
|
||||
|
||||
if (!props)
|
||||
return FALSE;
|
||||
|
||||
for (i = 0; props[i] != NULL; i++)
|
||||
{
|
||||
if (g_str_equal (props[i], property_name))
|
||||
|
Loading…
Reference in New Issue
Block a user