fix: reset active_cameras to set() not list in error handler (#22467)

In BirdsEyeFrameManager.update(), the exception handler on line 756
resets self.active_cameras to [] (a list), but it is initialized as
set() and compared as a set throughout the rest of the code.

Since set() \!= [] evaluates to True even though both are empty, the
next call to update_frame() will incorrectly detect a layout change
and trigger an unnecessary frame rebuild after every exception.
This commit is contained in:
ryzendigo 2026-03-16 20:44:26 +08:00 committed by GitHub
parent 09df43a675
commit bf2dcfd622
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -753,7 +753,7 @@ class BirdsEyeFrameManager:
frame_changed, layout_changed = self.update_frame(frame)
except Exception:
frame_changed, layout_changed = False, False
self.active_cameras = []
self.active_cameras = set()
self.camera_layout = []
print(traceback.format_exc())