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:
Timm Bäder 2015-01-05 11:51:46 +01:00
parent aa4e2d4dc3
commit 327d35ed41

View File

@ -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))