diff --git a/selfdrive/ui/qt/onroad.cc b/selfdrive/ui/qt/onroad.cc index 076d0b9fbd..22a02f70cd 100644 --- a/selfdrive/ui/qt/onroad.cc +++ b/selfdrive/ui/qt/onroad.cc @@ -540,7 +540,7 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) { for (int i = 0; i < right_points.length(); i++) { const auto &acceleration = sm["uiPlan"].getUiPlan().getAccel(); float acceleration_future = 0; - if (i > acceleration.size()) { + if (i >= acceleration.size()) { break; } acceleration_future = acceleration[i];