Check if call controller was created when leaving call.

Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Ivan Sein 2018-08-14 16:41:26 +02:00
Родитель 0f2b2856ed
Коммит 02afeaba89
1 изменённых файлов: 6 добавлений и 7 удалений

Просмотреть файл

@ -445,7 +445,7 @@ typedef NS_ENUM(NSInteger, CallState) {
- (void)hangup
{
[self dismissCallView];
[self.delegate callViewControllerWantsToBeDismissed:self];
[_localVideoView.captureSession stopRunning];
_localVideoView.captureSession = nil;
@ -459,12 +459,11 @@ typedef NS_ENUM(NSInteger, CallState) {
[_renderersDict removeObjectForKey:peerConnection.peerId];
}
[_callController leaveCall];
}
- (void)dismissCallView
{
[self.delegate callViewControllerWantsToBeDismissed:self];
if (_callController) {
[_callController leaveCall];
} else {
[self finishCall];
}
}
- (void)finishCall