diff --git a/tools/task_plots/plot_tasks.py b/tools/task_plots/plot_tasks.py
index b0b9f0e511dbdeff42a6c1885740593f8d7dbc42..6458b238bfef9e7a305ec351e2d61ee0a10780d2 100755
--- a/tools/task_plots/plot_tasks.py
+++ b/tools/task_plots/plot_tasks.py
@@ -410,6 +410,9 @@ print(("# Number of threads:", nthread))
 sdata = data[data[:, ticcol] != 0]
 sdata = sdata[sdata[:, toccol] != 0]
 
+if delta_t < 0.:
+    print("The time-range must be >=0!")
+    return 1
 # Each rank can have different clocks (compute node), but we want to use the
 # same delta times range for comparisons, so we suck it up and take the hit of
 # precalculating this, unless the user knows better.