diff --git a/selfdrive/ui/qt/onroad/annotated_camera.cc b/selfdrive/ui/qt/onroad/annotated_camera.cc index 4ebb79923b..b724887aae 100644 --- a/selfdrive/ui/qt/onroad/annotated_camera.cc +++ b/selfdrive/ui/qt/onroad/annotated_camera.cc @@ -91,9 +91,14 @@ mat4 AnnotatedCameraWidget::calcFrameMatrix() { void AnnotatedCameraWidget::paintGL() { UIState *s = uiState(); SubMaster &sm = *(s->sm); - sm.update(); const double start_draw_t = millis_since_boot(); + // if we haven't received all messages at least once, force an update of latest state + // many messages are required for UI draw and this will fail if any are not valid + if (!sm.allValid()) { + sm.update(); + } + // draw camera frame { std::lock_guard lk(frame_lock);