forked from mirrors/linphone-iphone
fix crash of call pending
This commit is contained in:
parent
d84809f1ce
commit
b62cf43995
2 changed files with 15 additions and 1 deletions
|
|
@ -421,6 +421,17 @@ static RootViewManager *rootViewManagerInstance = nil;
|
|||
}
|
||||
} else {
|
||||
linphone_call_resume((LinphoneCall *)calls->data);
|
||||
while (calls) {
|
||||
if (linphone_call_get_state((LinphoneCall *)calls->data) == LinphoneCallIncomingReceived ||
|
||||
linphone_call_get_state((LinphoneCall *)calls->data) == LinphoneCallIncomingEarlyMedia) {
|
||||
[self displayIncomingCall:(LinphoneCall *)calls->data];
|
||||
break;
|
||||
}
|
||||
calls = calls->next;
|
||||
}
|
||||
if (calls == NULL) {
|
||||
[self changeCurrentView:CallView.compositeViewDescription];
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,10 @@
|
|||
- (void)setPendingCall:(LinphoneCall *)pendingCall {
|
||||
if (pendingCall) {
|
||||
_pendingCall = pendingCall;
|
||||
if (_pendingCall)
|
||||
linphone_call_ref(_pendingCall);
|
||||
} else if (_pendingCall) {
|
||||
linphone_call_unref(_pendingCall);
|
||||
_pendingCall = NULL;
|
||||
}
|
||||
}
|
||||
|
|
@ -109,7 +112,7 @@
|
|||
return;
|
||||
|
||||
self.callKitCalls++;
|
||||
_pendingCall = call;
|
||||
[self setPendingCall:call];
|
||||
}
|
||||
|
||||
- (void)provider:(CXProvider *)provider performStartCallAction:(CXStartCallAction *)action {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue