about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRicky Kresslein <rk@lakoliu.com>2022-04-22 15:22:25 +0300
committerRicky Kresslein <rk@lakoliu.com>2022-04-22 15:22:25 +0300
commit7964475fea85055788903aaf257bfcbf16de5f10 (patch)
tree0fbff671b689360c468049261145b9f8874213d6
parent6f4be1c293d64e1e38bcf2cc255f4c42b0e9e990 (diff)
downloadFurtherance-7964475fea85055788903aaf257bfcbf16de5f10.tar.zst
Bug fix: crash when editing date of a task in a group that contained only one task
-rwxr-xr-xsrc/ui/task_details.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/task_details.rs b/src/ui/task_details.rs
index e462eb4..47ea369 100755
--- a/src/ui/task_details.rs
+++ b/src/ui/task_details.rs
@@ -444,7 +444,11 @@ impl FurTaskDetails {
         imp.all_task_ids.borrow_mut().clear();
         let window = FurtheranceWindow::default();
         window.reset_history_box();
-        self.setup_widgets(updated_list);
+        if updated_list.len() > 0 {
+            self.setup_widgets(updated_list);
+        } else {
+            self.close();
+        }
     }
 
     fn setup_signals(&self) {