Skip to content

Commit

Permalink
fixed out of range error which resulted in a nil indexPath
Browse files Browse the repository at this point in the history
  • Loading branch information
bhauman committed May 5, 2012
1 parent c3f300b commit 9232f0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GestureTable/app/gesture_recognizer.rb
Expand Up @@ -46,7 +46,7 @@ def scrollTable

def updateAddingIndexPathForCurrentLocation
indexPath = indexPathFromRecognizer(@longPressRecognizer)
if indexPath != @addingIndexPath
if indexPath && indexPath != @addingIndexPath
@tableView.beginUpdates
@tableView.deleteRowsAtIndexPaths([@addingIndexPath], withRowAnimation: UITableViewRowAnimationNone)
@tableView.insertRowsAtIndexPaths([indexPath], withRowAnimation: UITableViewRowAnimationNone)
Expand Down

0 comments on commit 9232f0a

Please sign in to comment.