Skip to content

Commit 8e0df03

Browse files
committed
Initialize camera width and height to 0
When creating a new CameraSettings for a detected camera, explicitly set width and height to 0. This ensures the new_cam instance has those fields initialized rather than relying on implicit defaults.
1 parent a5ca077 commit 8e0df03

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

dlclivegui/gui/camera_config_dialog.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,8 @@ def _add_selected_camera(self) -> None:
996996
new_cam = CameraSettings(
997997
name=detected.label,
998998
index=detected.index,
999+
width=0,
1000+
height=0,
9991001
fps=30.0,
10001002
backend=backend,
10011003
exposure=0,

0 commit comments

Comments
 (0)