Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixed crash on column removal. #14

Open
wants to merge 2 commits into from

1 participant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 DTGridView.m
View
4 DTGridView.m
@@ -243,7 +243,7 @@ - (void)removeCellWithInfo:(DTGridViewCellInfo *)info {
NSMutableArray *row = [gridCells objectAtIndex:info.yPosition];
- if (info.xPosition > [row count]) return;
+ if (info.xPosition >= [row count]) return;
DTGridViewCell *cell = [row objectAtIndex:info.xPosition];
@@ -485,7 +485,7 @@ - (void)checkViews {
else if ([[leftRightCells objectForKey:[NSString stringWithFormat:@"%i", info.yPosition]] xPosition] > info.xPosition)
[leftRightCells setObject:info forKey:[NSString stringWithFormat:@"%i", info.yPosition]];
}
- } else if (isGoingRight) {
+ } else if (isGoingRight && (self.gridCells.count > info.yPosition)) {
if ([[self.gridCells objectAtIndex:info.yPosition] count] - 1 > info.xPosition && info.frame.origin.x + info.frame.size.width < self.contentOffset.x + self.frame.size.width) {
if (![leftRightCells objectForKey:[NSString stringWithFormat:@"%i", info.yPosition]])
[leftRightCells setObject:info forKey:[NSString stringWithFormat:@"%i", info.yPosition]];
Something went wrong with that request. Please try again.