From 46c41c1218082ca9935c9a5d65d27a2c6e3499d2 Mon Sep 17 00:00:00 2001 From: Benoit Martins Date: Tue, 30 Apr 2024 11:48:16 +0200 Subject: [PATCH] Fix when participant device is nil --- Linphone/TelecomManager/TelecomManager.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Linphone/TelecomManager/TelecomManager.swift b/Linphone/TelecomManager/TelecomManager.swift index ed3994313..72ff6e84e 100644 --- a/Linphone/TelecomManager/TelecomManager.swift +++ b/Linphone/TelecomManager/TelecomManager.swift @@ -386,12 +386,12 @@ class TelecomManager: ObservableObject { if call.conference!.activeSpeakerParticipantDevice != nil { let direction = call.conference?.activeSpeakerParticipantDevice!.getStreamCapability(streamType: StreamType.Video) self.remoteConfVideo = direction == .SendRecv || direction == .SendOnly - } else if call.conference!.participantList.first != nil + } else if call.conference!.participantList.first != nil && call.conference!.participantDeviceList.first != nil && call.conference!.participantList.first?.address != nil && call.conference!.participantList.first!.address!.clone()!.equal(address2: (call.conference!.me?.address)!) { let direction = call.conference!.participantDeviceList.first!.getStreamCapability(streamType: StreamType.Video) self.remoteConfVideo = direction == .SendRecv || direction == .SendOnly - } else if call.conference!.participantList.last != nil + } else if call.conference!.participantList.last != nil && call.conference!.participantDeviceList.last != nil && call.conference!.participantList.last?.address != nil { let direction = call.conference!.participantDeviceList.last!.getStreamCapability(streamType: StreamType.Video) self.remoteConfVideo = direction == .SendRecv || direction == .SendOnly