From e5f8c7170d7bf8593beae52a8f99887da06ff8fc Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Sat, 21 Feb 2015 14:41:17 +0200 Subject: [PATCH] Bug fix - do not attempt to call Inhibit() if logind isn't running. --- src/xfpm-manager.c | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) diff --git a/src/xfpm-manager.c b/src/xfpm-manager.c index 9549b66..0795414 100644 --- a/src/xfpm-manager.c +++ b/src/xfpm-manager.c @@ -550,6 +550,9 @@ xfpm_manager_inhibit_sleep_systemd (XfpmManager *manager) if (g_strcmp0(what, "") == 0) return -1; + if (!(LOGIND_RUNNING())) + return -1; + XFPM_DEBUG ("Inhibiting systemd sleep: %s", what); bus_connection = dbus_g_connection_get_connection (manager->priv->system_bus); -- libgit2 0.21.2