Prevent null pointer crash in Endstops::update
Thanks to Evgeny Kotsuba!
This commit is contained in:
parent
72776f647b
commit
8a19bc0c0e
@ -421,6 +421,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
|
||||
@ -535,6 +537,8 @@ void Endstops::update() {
|
||||
}
|
||||
}
|
||||
|
||||
} // stepper.current_block
|
||||
|
||||
old_endstop_bits = current_endstop_bits;
|
||||
|
||||
} // Endstops::update()
|
||||
|
Loading…
Reference in New Issue
Block a user