From 2d0af97d23979a383a354c5a81c9a4630288620e Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Thu, 11 Mar 2021 18:01:28 +0100 Subject: [PATCH] remove duplicated fileTransferDelegates --- Classes/LinphoneManager.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 9bfd5520a..17585fed7 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -1365,6 +1365,8 @@ void popup_link_account_cb(LinphoneAccountCreator *creator, LinphoneAccountCreat if (theLinphoneCore != nil) { // just in case application terminate before linphone core initialization + // rare case, remove duplicated fileTransferDelegates to avoid crash + [_fileTransferDelegates setArray:[[NSSet setWithArray:_fileTransferDelegates] allObjects]]; for (FileTransferDelegate *ftd in _fileTransferDelegates) { [ftd stopAndDestroy]; }