Do not freeze UI of History on NULL call log id

This commit is contained in:
Benjamin Reis 2017-06-13 17:01:21 +02:00
parent c4e3a93c63
commit a921b18469
2 changed files with 6 additions and 6 deletions

View file

@ -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];

View file

@ -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");
}
}