mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-04-20 23:30:40 +02:00
linux: Fix crash if logind doesn't return an error
For example, when using an incomplete mock logind.
This commit is contained in:
parent
598fdbc5e0
commit
c68daf665f
1 changed files with 2 additions and 1 deletions
|
|
@ -668,7 +668,8 @@ up_backend_inhibitor_lock_take (UpBackend *backend)
|
|||
NULL,
|
||||
&error);
|
||||
if (out == NULL) {
|
||||
g_warning ("Could not acquire inhibitor lock: %s", error->message);
|
||||
g_warning ("Could not acquire inhibitor lock: %s",
|
||||
error ? error->message : "Unknown reason");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue