diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp
index 2160e9a3195ece79c02d30788275b713a51b7e25..768e4980225827165217901b099a67215517fe7d 100644
--- a/Marlin/Marlin_main.cpp
+++ b/Marlin/Marlin_main.cpp
@@ -4254,7 +4254,7 @@ inline void gcode_M42() {
     #if ENABLED(DELTA)
       // we don't do bed level correction in M48 because we want the raw data when we probe
       reset_bed_level();
-    #else
+    #elif ENABLED(AUTO_BED_LEVELING_FEATURE)
       // we don't do bed level correction in M48 because we want the raw data when we probe
       planner.bed_level_matrix.set_to_identity();
     #endif