fix(graphics): exit if connection to com.system76.PowerDaemon fails
This commit is contained in:
parent
2d1b8680f9
commit
28446a33ab
2 changed files with 9 additions and 1 deletions
|
|
@ -89,5 +89,9 @@ pub async fn init() -> Option<(Connection, PowerDaemonProxy<'static>)> {
|
|||
_ => return None,
|
||||
};
|
||||
|
||||
if matches!(proxy.introspect().await, Err(zbus::fdo::Error::ServiceUnknown(_))) {
|
||||
return None;
|
||||
}
|
||||
|
||||
Some((conn, proxy))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue