From a921b18469519edc6c922794fc6befb99c13aabf Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 13 Jun 2017 17:01:21 +0200 Subject: [PATCH] Do not freeze UI of History on NULL call log id --- Classes/HistoryListTableView.m | 2 +- Classes/LinphoneUI/UIHistoryCell.m | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Classes/HistoryListTableView.m b/Classes/HistoryListTableView.m index 14ac6633c..09cf99016 100644 --- a/Classes/HistoryListTableView.m +++ b/Classes/HistoryListTableView.m @@ -221,7 +221,7 @@ if (![self isEditing]) { id log = [_sections objectForKey:_sortedDays[indexPath.section]][indexPath.row]; LinphoneCallLog *callLog = [log pointerValue]; - if (callLog != NULL && linphone_call_log_get_call_id(callLog) != NULL) { + if (callLog != NULL) { if (IPAD) { UIHistoryCell *cell = (UIHistoryCell *)[self tableView:tableView cellForRowAtIndexPath:indexPath]; [cell onDetails:self]; diff --git a/Classes/LinphoneUI/UIHistoryCell.m b/Classes/LinphoneUI/UIHistoryCell.m index a1b29ad6d..ee7334646 100644 --- a/Classes/LinphoneUI/UIHistoryCell.m +++ b/Classes/LinphoneUI/UIHistoryCell.m @@ -56,13 +56,13 @@ #pragma mark - Action Functions - (IBAction)onDetails:(id)event { - if (callLog != NULL && linphone_call_log_get_call_id(callLog) != NULL) { - // Go to History details view + if (callLog != NULL) { HistoryDetailsView *view = VIEW(HistoryDetailsView); - [view setCallLogId:[NSString stringWithUTF8String:linphone_call_log_get_call_id(callLog)]]; + if (linphone_call_log_get_call_id(callLog) != NULL) { + // Go to History details view + [view setCallLogId:[NSString stringWithUTF8String:linphone_call_log_get_call_id(callLog)]]; + } [PhoneMainView.instance changeCurrentView:view.compositeViewDescription]; - } else { - LOGE(@"Cannot open selected call log, it is NULL or corrupted"); } }