Skip to content

Commit

Permalink
Merge pull request #695 from Sequel-Ace/fix-SPTableInfo-crash
Browse files Browse the repository at this point in the history
#fixed SPTableInfo crash
  • Loading branch information
Jason-Morcos committed Dec 26, 2020
2 parents b33ac44 + b788663 commit 4540f8e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Source/Controllers/SubviewControllers/SPTableInfo.m
Expand Up @@ -350,7 +350,18 @@ - (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex
{
if (tableView == infoTable) {
return [info objectAtIndex:rowIndex];
if(info.count <= (NSUInteger)rowIndex){
NSDictionary *userInfo = @{
NSLocalizedDescriptionKey: @"info.count <= (NSUInteger)rowIndex",
@"info.count":@(info.count),
@"rowIndex":@(rowIndex),
@"info":info
};
CLS_LOG(@"info.count <= (NSUInteger)rowIndex: [%lu] vs [%li]", (unsigned long)info.count, (long)rowIndex);
SPLog(@"info.count <= (NSUInteger)rowIndex: [%lu] vs [%li]", (unsigned long)info.count, (long)rowIndex);
[FIRCrashlytics.crashlytics recordError:[NSError errorWithDomain:@"database" code:4 userInfo:userInfo]];
}
return [info safeObjectAtIndex:rowIndex];
}
else {
if (rowIndex == 0) {
Expand Down

0 comments on commit 4540f8e

Please sign in to comment.