From 5d487ef40e4017beabe4874537b2f51bc3558457 Mon Sep 17 00:00:00 2001 From: gjdodd <31553294+gjdodd@users.noreply.github.com> Date: Wed, 24 Oct 2018 23:52:39 +0100 Subject: [PATCH] Fix null exception due to duration_t of zero (#12207) --- Marlin/src/lcd/extensible_ui/ui_api.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Marlin/src/lcd/extensible_ui/ui_api.cpp b/Marlin/src/lcd/extensible_ui/ui_api.cpp index 1ed15cb60..606b7b6fc 100644 --- a/Marlin/src/lcd/extensible_ui/ui_api.cpp +++ b/Marlin/src/lcd/extensible_ui/ui_api.cpp @@ -445,8 +445,7 @@ namespace UI { } uint32_t getProgress_seconds_elapsed() { - const duration_t elapsed = IFPC(print_job_timer.duration(), 0); - return elapsed.value; + return IFPC(print_job_timer.duration(), 0); } #if ENABLED(PRINTCOUNTER)