Skip to content

Commit

Permalink
Prevent crash on refresh while scrolling in LabsViewController
Browse files Browse the repository at this point in the history
  • Loading branch information
cdzombak committed Feb 3, 2012
1 parent ccac253 commit d8f2a62
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CAENLabStatus/DZCLabsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
cell = (UITableViewCell *)[nib objectAtIndex:0];
}

if ([[self.labs objectAtIndex:indexPath.section] count] < indexPath.row+1) {
return cell;
}

DZCLab *lab = [(NSArray *)[self.labs objectAtIndex:indexPath.section] objectAtIndex:indexPath.row];

switch (indexPath.section) {
Expand Down

0 comments on commit d8f2a62

Please sign in to comment.