diff options
author | Ricky Kresslein <rk@lakoliu.com> | 2022-04-14 16:21:13 +0300 |
---|---|---|
committer | Ricky Kresslein <rk@lakoliu.com> | 2022-04-14 16:21:13 +0300 |
commit | dd7f8f8a6462b81cadf9f5f2a0b2a31757c59c18 (patch) | |
tree | 87f4cd5a874846f9c0785e2e7a9748f5fa060d8f /src/ui | |
parent | 9edc8c9737c744056b8c92af88a77ee889813e13 (diff) | |
download | Furtherance-dd7f8f8a6462b81cadf9f5f2a0b2a31757c59c18.tar.zst |
Fix bug #22: No longer crashes when not using GNOME
Diffstat (limited to 'src/ui')
-rwxr-xr-x | src/ui/window.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ui/window.rs b/src/ui/window.rs index dd6ae54..e535c2e 100755 --- a/src/ui/window.rs +++ b/src/ui/window.rs @@ -262,7 +262,10 @@ impl FurtheranceWindow { fn check_user_idle(&self) { let imp = imp::FurtheranceWindow::from_instance(self); // Check for user idle - let idle_time = self.get_idle_time().unwrap(); + let idle_time = match self.get_idle_time() { + Ok(val) => val, + Err(_) => 1, + }; // If user was idle and has now returned... if idle_time < (settings_manager::get_int("idle-time") * 60) as u64 |