From 5b854647913ae694ded4c6b21fa00cc7d5aa331f Mon Sep 17 00:00:00 2001
From: Sebastianv650 <sebastian.popp@vodafonemail.de>
Date: Wed, 7 Mar 2018 12:33:13 +0100
Subject: [PATCH] Fix for LA (#9964)

Missed in the original LA 1.5 PR: eISR has to use a local copy of
current_block->use_advance_lead because it might still run wenn the last
block has been set to NULL.
---
 Marlin/src/module/stepper.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp
index fd4a3c3b59..9f4be4c40e 100644
--- a/Marlin/src/module/stepper.cpp
+++ b/Marlin/src/module/stepper.cpp
@@ -776,7 +776,7 @@ void Stepper::isr() {
       #define STOP_E_PULSE(INDEX) do { if (e_steps) { E## INDEX ##_STEP_WRITE(INVERT_E_STEP_PIN); e_steps < 0 ? ++e_steps : --e_steps; } }while(0)
     #endif
 
-    if (current_block->use_advance_lead) {
+    if (use_advance_lead) {
       if (step_events_completed > LA_decelerate_after && current_adv_steps > final_adv_steps) {
         e_steps--;
         current_adv_steps--;