mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
fix crash when linphone_core_get_video_device() is NULL
This commit is contained in:
parent
c6d0dfb21f
commit
8b54fb0f6c
1 changed files with 2 additions and 2 deletions
|
|
@ -1471,14 +1471,14 @@ void assistant_is_account_linked(LinphoneAccountCreator *creator, LinphoneAccoun
|
|||
[[UIDevice currentDevice] setValue:value forKey:@"orientation"];
|
||||
//[UIViewController attemptRotationToDeviceOrientation];
|
||||
AVCaptureDevice *backCamera = [AVCaptureDevice defaultDeviceWithDeviceType:AVCaptureDeviceTypeBuiltInWideAngleCamera mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionBack];
|
||||
if (![[NSString stringWithUTF8String:linphone_core_get_video_device(LC)] containsString:[backCamera uniqueID]]) {
|
||||
if (![[NSString stringWithUTF8String:linphone_core_get_video_device(LC) ?: ""] containsString:[backCamera uniqueID]]) {
|
||||
|
||||
bctbx_list_t *deviceList = linphone_core_get_video_devices_list(LC);
|
||||
NSMutableArray *devices = [NSMutableArray array];
|
||||
|
||||
while (deviceList) {
|
||||
char *data = deviceList->data;
|
||||
[devices addObject:[NSString stringWithUTF8String:data]];
|
||||
if (data) [devices addObject:[NSString stringWithUTF8String:data]];
|
||||
deviceList = deviceList->next;
|
||||
}
|
||||
bctbx_list_free(deviceList);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue