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

pull/23683/head
Willem Melching 3 years ago committed by GitHub
parent 8a2cbfe00b
commit 955c7435f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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());
}
}

Loading…
Cancel
Save