Commit 327d35ed authored by Timm Bäder's avatar Timm Bäder 🤔

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.
parent aa4e2d4d
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment