Commit 0d7f58f8 authored by Christian Kellner's avatar Christian Kellner
Browse files

Test we have logind proxy before taking the lock

Before trying to take the inhibitor lock via logind we should
check we actually have the logind connection, because we are not
failing in init() if we could not get the logind proxy.
parent 143680ce
...@@ -931,6 +931,10 @@ gbb_application_inhibitor_lock_take(GbbApplication *application) ...@@ -931,6 +931,10 @@ gbb_application_inhibitor_lock_take(GbbApplication *application)
GUnixFDList *fds; GUnixFDList *fds;
GError *error = NULL; GError *error = NULL;
if (application->logind == NULL) {
return FALSE;
if (application->inhibitor_fd > -1) { if (application->inhibitor_fd > -1) {
return TRUE; return TRUE;
} }
Supports Markdown
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