Skip to content

Commit 0e52455

Browse files
committed
Only remove positive timeout IDs
1 parent 8c607e7 commit 0e52455

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Reminder.vala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ public class Badger.Reminder : GLib.Object {
5353
interval = new_interval;
5454

5555
// Disable old timer to avoid repeated notifications
56-
Source.remove (timeout_id);
56+
if (timeout_id > 0) {
57+
Source.remove (timeout_id);
58+
}
5759

5860
// Setting a zero-second timer can hang the entire OS
5961
if (interval > 0) {

0 commit comments

Comments
 (0)