fixed null pointer dereference in planner_forward_pass_kernel
This commit is contained in:
parent
67d7607e60
commit
2be3a6cc61
@ -232,6 +232,7 @@ void planner_reverse_pass() {
|
||||
// The kernel called by planner_recalculate() when scanning the plan from first to last entry.
|
||||
void planner_forward_pass_kernel(block_t *previous, block_t *current, block_t *next) {
|
||||
if(!current) { return; }
|
||||
if(previous) {
|
||||
// If the previous block is an acceleration block, but it is not long enough to
|
||||
// complete the full speed change within the block, we need to adjust out entry
|
||||
// speed accordingly. Remember current->entry_factor equals the exit factor of
|
||||
@ -244,6 +245,7 @@ void planner_forward_pass_kernel(block_t *previous, block_t *current, block_t *n
|
||||
current->entry_factor = max_entry_factor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// planner_recalculate() needs to go over the current plan twice. Once in reverse and once forward. This
|
||||
|
Loading…
Reference in New Issue
Block a user