mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 21:14:01 +08:00
ui: add safety check to prevent ui overlay access to invalid data (#35432)
check ui_state.started
This commit is contained in:
@@ -44,6 +44,10 @@ class AugmentedRoadView(CameraView):
|
||||
self.driver_state_renderer = DriverStateRenderer()
|
||||
|
||||
def render(self, rect):
|
||||
# Only render when system is started to avoid invalid data access
|
||||
if not ui_state.started:
|
||||
return
|
||||
|
||||
# Update calibration before rendering
|
||||
self._update_calibration()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user