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.
|
// 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) {
|
void planner_forward_pass_kernel(block_t *previous, block_t *current, block_t *next) {
|
||||||
if(!current) { return; }
|
if(!current) { return; }
|
||||||
|
if(previous) {
|
||||||
// If the previous block is an acceleration block, but it is not long enough to
|
// 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
|
// 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
|
// speed accordingly. Remember current->entry_factor equals the exit factor of
|
||||||
@ -245,6 +246,7 @@ void planner_forward_pass_kernel(block_t *previous, block_t *current, block_t *n
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// planner_recalculate() needs to go over the current plan twice. Once in reverse and once forward. This
|
// planner_recalculate() needs to go over the current plan twice. Once in reverse and once forward. This
|
||||||
// implements the forward pass.
|
// implements the forward pass.
|
||||||
|
Loading…
Reference in New Issue
Block a user