Fix null exception due to duration_t of zero (#12207)

This commit is contained in:
gjdodd 2018-10-24 23:52:39 +01:00 committed by Scott Lahteine
parent a9061714f2
commit 5d487ef40e

View File

@ -445,8 +445,7 @@ namespace UI {
} }
uint32_t getProgress_seconds_elapsed() { uint32_t getProgress_seconds_elapsed() {
const duration_t elapsed = IFPC(print_job_timer.duration(), 0); return IFPC(print_job_timer.duration(), 0);
return elapsed.value;
} }
#if ENABLED(PRINTCOUNTER) #if ENABLED(PRINTCOUNTER)