diff --git a/src/engine/guidance/post_processing.cpp b/src/engine/guidance/post_processing.cpp index 0e4a40d4a..5c678711b 100644 --- a/src/engine/guidance/post_processing.cpp +++ b/src/engine/guidance/post_processing.cpp @@ -832,8 +832,8 @@ std::vector collapseTurns(std::vector steps) invalidateStep(steps[step_index]); invalidateStep(steps[next_step_index]); } - else if (choiceless(current_step, one_back_step) || - one_back_step.distance <= MAX_COLLAPSE_DISTANCE) + else if (one_back_index > 0 && (choiceless(current_step, one_back_step) || + one_back_step.distance <= MAX_COLLAPSE_DISTANCE)) { // check for one of the multiple collapse scenarios and, if possible, collapse the // turn