Skip to main content
Sign in
Snippets Groups Projects
Commit a5c6d3c7 authored by Scott Lahteine's avatar Scott Lahteine
Browse files

Prevent null pointer crash in Endstops::update

Thanks to Evgeny Kotsuba!
parent 53362b81
Branches
Tags
No related merge requests found
...@@ -448,6 +448,8 @@ void Endstops::update() { ...@@ -448,6 +448,8 @@ void Endstops::update() {
/** /**
* Check and update endstops according to conditions * Check and update endstops according to conditions
*/ */
if (stepper.current_block) {
if (X_MOVE_TEST) { if (X_MOVE_TEST) {
if (stepper.motor_direction(X_AXIS_HEAD)) { // -direction if (stepper.motor_direction(X_AXIS_HEAD)) { // -direction
#if HAS_X_MIN #if HAS_X_MIN
...@@ -562,6 +564,8 @@ void Endstops::update() { ...@@ -562,6 +564,8 @@ void Endstops::update() {
} }
} }
} // stepper.current_block
old_endstop_bits = current_endstop_bits; old_endstop_bits = current_endstop_bits;
} // Endstops::update() } // Endstops::update()
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment