Skip to content

Commit

Permalink
Issue lxcid#77 - Fixing a crash when previousIndexPath is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuafeldman committed May 18, 2016
1 parent 58b772e commit 84af63f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ - (void)invalidateLayoutIfNecessary {
NSIndexPath *newIndexPath = [self.collectionView indexPathForItemAtPoint:self.currentView.center];
NSIndexPath *previousIndexPath = self.selectedItemIndexPath;

if ((newIndexPath == nil) || [newIndexPath isEqual:previousIndexPath]) {
if ((newIndexPath == nil) || (previousIndexPath == nil) || [newIndexPath isEqual:previousIndexPath]) {
return;
}

Expand Down

0 comments on commit 84af63f

Please sign in to comment.