fix UI segfault when starting onroad and receiving radarState before modelV2 (#23739)

This commit is contained in:
Willem Melching
2022-02-10 13:52:03 +01:00
committed by GitHub
parent 8a2cbfe00b
commit 955c7435f8

View File

@@ -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());
}
}