mirror of
https://github.com/brl/mutter.git
synced 2025-01-27 20:08:56 +00:00
idle-monitor: NULL check cached InhibitedActions property variant
We might not have a cached "InhibitedActions" property available for us, so do as elsewhere in this file and NULL check before processing it. https://gitlab.gnome.org/GNOME/mutter/merge_requests/130 (cherry picked from commit a3269dde952974554155b751db54603cedad9a76)
This commit is contained in:
parent
59d2d5ef3b
commit
b44f93ee9b
@ -262,8 +262,11 @@ meta_idle_monitor_init (MetaIdleMonitor *monitor)
|
|||||||
|
|
||||||
v = g_dbus_proxy_get_cached_property (monitor->session_proxy,
|
v = g_dbus_proxy_get_cached_property (monitor->session_proxy,
|
||||||
"InhibitedActions");
|
"InhibitedActions");
|
||||||
monitor->inhibited = g_variant_get_uint32 (v) & GSM_INHIBITOR_FLAG_IDLE;
|
if (v)
|
||||||
g_variant_unref (v);
|
{
|
||||||
|
monitor->inhibited = g_variant_get_uint32 (v) & GSM_INHIBITOR_FLAG_IDLE;
|
||||||
|
g_variant_unref (v);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user