diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 9b973f209..857fc73da 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -8379,7 +8379,7 @@ inline void gcode_M18_M84() { } #if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(ULTIPANEL) // Only needed with an LCD - ubl.lcd_map_control = defer_return_to_status = false; + if (ubl.lcd_map_control) ubl.lcd_map_control = defer_return_to_status = false; #endif } } @@ -13397,7 +13397,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { disable_e_steppers(); #endif #if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(ULTIPANEL) // Only needed with an LCD - ubl.lcd_map_control = defer_return_to_status = false; + if (ubl.lcd_map_control) ubl.lcd_map_control = defer_return_to_status = false; #endif }