fix crash when parse recording file failed, may changed phone language

This commit is contained in:
Danmei Chen 2021-02-15 11:26:32 +01:00
parent faa4e15462
commit 71a9b8ef41

View file

@ -84,6 +84,10 @@
NSArray *parsedName = [LinphoneUtils parseRecordingName:file];
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"EEEE, MMM d, yyyy"];
if ([parsedName count] < 2) {
LOGW(@"Can not parse this recoding file: %@", file);
continue;
}
NSString *dayPretty = [dateFormat stringFromDate:[parsedName objectAtIndex:1]];
NSMutableArray *recOfDay = [recordings objectForKey:dayPretty];
if (recOfDay) {