From 2c2cef7858482e9729f69b968bbb6f942ac63910 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 2 Mar 2023 11:59:49 -0800 Subject: [PATCH] fix crash? --- selfdrive/ui/qt/onroad.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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];