Abhishek Banthia 9 years ago
parent
commit
d068b4e073
  1. 11
      Clocker/Preferences/CLPreferencesViewController.m

11
Clocker/Preferences/CLPreferencesViewController.m

@ -790,9 +790,16 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?";
return;
}
CLTimezoneData *dataObject = self.filteredArray[self.availableTimezoneTableView.selectedRow];
/*Fix for http://crashes.to/s/5b1432e77c9
Additional precautions taken to make sure selected row's value is in the filtered array!
*/
if (self.availableTimezoneTableView.selectedRow >=0 && self.availableTimezoneTableView.selectedRow < self.filteredArray.count)
{
CLTimezoneData *dataObject = self.filteredArray[self.availableTimezoneTableView.selectedRow];
/*Strip till the first comma we encounter*/
NSString *filteredAddress = dataObject.formattedAddress;
@ -831,6 +838,8 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?";
[[NSUserDefaults standardUserDefaults] setObject:newArray forKey:CLDefaultPreferenceKey];
}
self.filteredArray = [NSMutableArray array];
[self.availableTimezoneTableView reloadData];

Loading…
Cancel
Save