mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-14 03:40:00 +02:00
Merge pull request #1532 from vector-im/rageshakes_312_314
MediaPickerViewController: Add sanity checks to avoid crashes
This commit is contained in:
@@ -1000,6 +1000,12 @@ static void *RecordingContext = &RecordingContext;
|
||||
NSLog(@"[MediaPickerVC] Attemping to setup AVCapture when it is already started!");
|
||||
return;
|
||||
}
|
||||
if (!cameraQueue)
|
||||
{
|
||||
NSLog(@"[MediaPickerVC] Attemping to setup AVCapture when it is being destroyed!");
|
||||
return;
|
||||
}
|
||||
|
||||
isCaptureSessionSetupInProgress = YES;
|
||||
|
||||
[self.cameraActivityIndicator startAnimating];
|
||||
@@ -1192,6 +1198,12 @@ static void *RecordingContext = &RecordingContext;
|
||||
|
||||
- (void)tearDownAVCapture
|
||||
{
|
||||
if (!cameraQueue)
|
||||
{
|
||||
NSLog(@"[MediaPickerVC] Attemping to tear down AVCapture when it is being destroyed!");
|
||||
return;
|
||||
}
|
||||
|
||||
dispatch_sync(cameraQueue, ^{
|
||||
frontCameraInput = nil;
|
||||
backCameraInput = nil;
|
||||
|
||||
Reference in New Issue
Block a user