From e9c6c6c846c932eea9fb46894779e10ef1f30a52 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Thu, 13 Jun 2024 14:17:23 -0400 Subject: [PATCH] Be resilient to a missing 'entry' in urgency (#3479) Any combination of properties is possible - Taskwarrior should make the best of the tasks it finds, rather than crashing. --- src/Task.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Task.cpp b/src/Task.cpp index 0d0d080b4..cb9626b41 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -2319,7 +2319,8 @@ float Task::urgency_due () const //////////////////////////////////////////////////////////////////////////////// float Task::urgency_age () const { - assert (has ("entry")); + if (!has ("entry")) + return 1.0; Datetime now; Datetime entry (get_date ("entry"));