mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-10-05 15:23:29 +01:00
Fix crash when enabling vanity camera before capturer initialization.
This commit is contained in:
1 parent
0bf54e6b45
commit
58ab03b4e3
1 file changed
+2
-1
@@ -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