Call delegate also if a crash was detected but could not be read

If PLCrashReporter wrote a crash report, that could not be read, no delegate was fired. That could make the app stay in the start up maintenance screen, if it handles crashes on startup.
Though there was no report this ever happened, there is the theoretical chance this could.
This commit is contained in:
Andreas Linde 2012-11-26 19:45:21 +01:00
parent 9ffae558df
commit 1099764222

View File

@ -367,8 +367,17 @@ NSString *const kBITCrashManagerStatus = @"BITCrashManagerStatus";
if ([_crashFiles count] > 0) {
BITHockeyLog(@"INFO: %i pending crash reports found.", [_crashFiles count]);
return YES;
} else
} else {
if (_didCrashInLastSession) {
if (self.delegate != nil && [self.delegate respondsToSelector:@selector(crashManagerWillCancelSendingCrashReport:)]) {
[self.delegate crashManagerWillCancelSendingCrashReport:self];
}
_didCrashInLastSession = NO;
}
return NO;
}
}