mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Fix crash in updateEncryption by safely handling optional currentCall
This commit is contained in:
parent
90f2ad7e58
commit
c7a9edf25f
1 changed files with 2 additions and 5 deletions
|
|
@ -985,14 +985,11 @@ class CallViewModel: ObservableObject {
|
|||
self.isNotEncrypted = false
|
||||
}
|
||||
case MediaEncryption.None:
|
||||
let isNotEncryptedTmp = self.currentCall?.state == .StreamsRunning
|
||||
DispatchQueue.main.async {
|
||||
self.isMediaEncrypted = false
|
||||
self.isZrtp = false
|
||||
if self.currentCall!.state == .StreamsRunning {
|
||||
self.isNotEncrypted = true
|
||||
} else {
|
||||
self.isNotEncrypted = false
|
||||
}
|
||||
self.isNotEncrypted = isNotEncryptedTmp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue