Check array size before accessing section - rare crash for improper data source use, de-escalated to messaging nil.

This commit is contained in:
Scott Goodson
2016-01-14 00:25:53 -08:00
parent 9afb77f7bc
commit df10f8f19a

View File

@@ -900,7 +900,8 @@ static void *kASSizingQueueContext = &kASSizingQueueContext;
- (NSUInteger)numberOfRowsInSection:(NSUInteger)section
{
ASDisplayNodeAssertMainThread();
return [[self completedNodes][section] count];
NSArray *completedNodes = [self completedNodes];
return (section < completedNodes.count) ? [completedNodes[section] count] : 0;
}
- (ASCellNode *)nodeAtIndexPath:(NSIndexPath *)indexPath