From 8e2c273be8a377fb8b7823c97e204c2a6c86a1d0 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Thu, 10 Feb 2022 13:52:03 +0100 Subject: [PATCH] fix UI segfault when starting onroad and receiving radarState before modelV2 (#23739) old-commit-hash: 955c7435f80ccfebd33b32ca3d6f2f40f18b044b --- selfdrive/ui/ui.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index c6fde5c48f..007dc36d07 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -129,7 +129,7 @@ static void update_state(UIState *s) { if (sm.updated("modelV2")) { update_model(s, sm["modelV2"].getModelV2()); } - if (sm.updated("radarState") && sm.rcv_frame("modelV2") >= s->scene.started_frame) { + if (sm.updated("radarState") && sm.rcv_frame("modelV2") > s->scene.started_frame) { update_leads(s, sm["radarState"].getRadarState(), sm["modelV2"].getModelV2().getPosition()); } }