mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-04 13:38:21 +00:00
Make sure not to process a crash report file that could not be parsed
This commit is contained in:
parent
81014659ed
commit
59db07771e
@ -348,6 +348,9 @@ NSString *const kBITCrashManagerStatus = @"BITCrashManagerStatus";
|
||||
// get the startup timestamp from the crash report, and the file timestamp to calculate the timeinterval when the crash happened after startup
|
||||
BITPLCrashReport *report = [[BITPLCrashReport alloc] initWithData:crashData error:&error];
|
||||
|
||||
if (report == nil) {
|
||||
BITHockeyLog(@"WARNING: Could not parse crash report");
|
||||
} else {
|
||||
if ([report.processInfo respondsToSelector:@selector(processStartTime)]) {
|
||||
if (report.systemInfo.timestamp && report.processInfo.processStartTime) {
|
||||
_timeintervalCrashInLastSessionOccured = [report.systemInfo.timestamp timeIntervalSinceDate:report.processInfo.processStartTime];
|
||||
@ -380,6 +383,7 @@ NSString *const kBITCrashManagerStatus = @"BITCrashManagerStatus";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Purge the report
|
||||
// mark the end of the routine
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user