Skip to content

Commit 303925d

Browse files
committed
Fix corner case bug
1 parent f079379 commit 303925d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

TLIndexPathTools/View Controllers/TLTableViewController.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ - (UIViewController *)tableView:(UITableView *)tableView viewControllerForCell:(
172172
if (indexPath == nil) {
173173
indexPath = [self.tableView indexPathForCell:cell];
174174
}
175+
if (indexPath == nil) {
176+
return nil;
177+
}
175178
controller = [self tableView:tableView instantiateViewControllerForCell:cell atIndexPath:indexPath];
176179
if (controller) {
177180
[self setViewController:controller forKey:key];

0 commit comments

Comments
 (0)