Skip to content

Commit

Permalink
Fixed crash during reloading of inventories
Browse files Browse the repository at this point in the history
  • Loading branch information
koraktor committed Jul 20, 2015
1 parent 9e0e918 commit ede65f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Suitcase/Classes/SCGamesViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ - (void)inventoryLoaded:(NSNotification *)notification
} else {
NSInteger inventoryIndex = [self.inventories indexOfObject:inventory];

if (skipped) {
if (skipped && inventoryIndex != NSNotFound) {
NSMutableArray *newInventories = [self.inventories mutableCopy];
[newInventories removeObjectAtIndex:inventoryIndex];
self.inventories = [newInventories copy];
Expand Down

0 comments on commit ede65f8

Please sign in to comment.