Browse Source

Prevent null pointer crash in Endstops::update

Thanks to Evgeny Kotsuba!
pull/1/head
Scott Lahteine 6 years ago
parent
commit
a5c6d3c7b8
  1. 4
      Marlin/src/module/endstops.cpp

4
Marlin/src/module/endstops.cpp

@ -448,6 +448,8 @@ void Endstops::update() {
/**
* Check and update endstops according to conditions
*/
if (stepper.current_block) {
if (X_MOVE_TEST) {
if (stepper.motor_direction(X_AXIS_HEAD)) { // -direction
#if HAS_X_MIN
@ -562,6 +564,8 @@ void Endstops::update() {
}
}
} // stepper.current_block
old_endstop_bits = current_endstop_bits;
} // Endstops::update()

Loading…
Cancel
Save