Add null check to orientation unboxing.

This commit is contained in:
Greyson Parrelli
2026-04-09 22:13:41 -04:00
committed by jeffrey-signal
parent de584ccb7d
commit 0319adbce4

View File

@@ -108,10 +108,10 @@ public class Camera implements CameraControl, CameraVideoCapturer.CameraSwitchHa
@Override
public void setOrientation(@Nullable Integer orientation) {
this.orientation = orientation;
this.orientation = orientation != null ? orientation : 0;
if (isInitialized && capturer != null) {
capturer.setOrientation(orientation);
capturer.setOrientation(this.orientation);
}
}