mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-02 08:23:00 +01:00
Fix crash when enabling vanity camera before capturer initialization.
This commit is contained in:
@@ -87,6 +87,7 @@ public class Camera implements CameraControl, CameraVideoCapturer.CameraSwitchHa
|
||||
new CameraCapturerWrapper(observer));
|
||||
capturer.setOrientation(orientation);
|
||||
isInitialized = true;
|
||||
setEnabled(enabled);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -120,7 +121,7 @@ public class Camera implements CameraControl, CameraVideoCapturer.CameraSwitchHa
|
||||
|
||||
this.enabled = enabled;
|
||||
|
||||
if (capturer == null) {
|
||||
if (capturer == null || !isInitialized) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user