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

old-commit-hash: 955c7435f8
commatwo_master
Willem Melching 3 years ago committed by GitHub
parent 1eb13fdc65
commit 8e2c273be8
  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