From 556724a32dd99d9579b053b84b37359633fde88e Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Wed, 25 Apr 2012 17:22:08 +0200 Subject: [PATCH] Fix crashes when merging call with video enabled and on end call without incallview displayed --- Classes/IncallViewController.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Classes/IncallViewController.m b/Classes/IncallViewController.m index 588b289c5..3adaf99de 100644 --- a/Classes/IncallViewController.m +++ b/Classes/IncallViewController.m @@ -713,7 +713,9 @@ static void hideSpinner(LinphoneCall* call, void* user_data) { videoWaitingForFirstImage.hidden = NO; [videoWaitingForFirstImage startAnimating]; - linphone_call_set_next_video_frame_decoded_callback(call, hideSpinner, self); + if (call->videostream) { + linphone_call_set_next_video_frame_decoded_callback(call, hideSpinner, self); + } return; if (mIncallViewIsReady) { @@ -1003,10 +1005,10 @@ static void hideSpinner(LinphoneCall* call, void* user_data) { cell.accessoryType = UITableViewCellAccessoryNone; } else { LinphoneCall* call = [IncallViewController retrieveCallAtIndex:indexPath.row inConference:NO]; + if (call == nil) + return cell; // return dummy cell LinphoneMediaEncryption enc = linphone_call_params_get_media_encryption(linphone_call_get_current_params(call)); - if (call == nil) - return nil; - if (cell.accessoryView == nil) { + if (cell.accessoryView == nil) { UIView *containerView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 28, 28)] autorelease]; cell.accessoryView = containerView; }