Authored by Justin R. Miller

fixes #238: don't crash on CGRectZero/invalid frame with MapBox sources

... ... @@ -37,7 +37,8 @@
if (self.mapScrollViewDelegate)
[self.mapScrollViewDelegate scrollView:self correctedContentOffset:&contentOffset];
[super setContentOffset:contentOffset];
if (contentOffset.x && contentOffset.y)
[super setContentOffset:contentOffset];
}
- (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated
... ... @@ -45,7 +46,8 @@
if (self.mapScrollViewDelegate)
[self.mapScrollViewDelegate scrollView:self correctedContentOffset:&contentOffset];
[super setContentOffset:contentOffset animated:animated];
if (contentOffset.x && contentOffset.y)
[super setContentOffset:contentOffset animated:animated];
}
- (void)setContentSize:(CGSize)contentSize
... ...