From dd7f8f8a6462b81cadf9f5f2a0b2a31757c59c18 Mon Sep 17 00:00:00 2001 From: Ricky Kresslein Date: Thu, 14 Apr 2022 16:21:13 +0300 Subject: Fix bug #22: No longer crashes when not using GNOME --- src/ui/window.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ui') 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 -- cgit 1.4.1