diff --git a/Marlin/src/gcode/bedlevel/M420.cpp b/Marlin/src/gcode/bedlevel/M420.cpp index 9e4de215ed..9e96b456e3 100644 --- a/Marlin/src/gcode/bedlevel/M420.cpp +++ b/Marlin/src/gcode/bedlevel/M420.cpp @@ -64,9 +64,9 @@ void GcodeSuite::M420() { #if ENABLED(MARLIN_DEV_MODE) if (parser.intval('S') == 2) { + const float x_min = probe_min_x(), x_max = probe_max_x(), + y_min = probe_min_y(), y_max = probe_max_y(); #if ENABLED(AUTO_BED_LEVELING_BILINEAR) - const float x_min = probe_min_x(), x_max = probe_max_x(), - y_min = probe_min_y(), y_max = probe_max_y(); bilinear_start.set(x_min, y_min); bilinear_grid_spacing.set((x_max - x_min) / (GRID_MAX_POINTS_X - 1), (y_max - y_min) / (GRID_MAX_POINTS_Y - 1));