settings: fix crash when opening it too quickly

This commit is contained in:
Gautier Pelloux-Prayer 2016-01-15 16:39:02 +01:00
parent 80e271a964
commit be3a94e20c

View file

@ -282,6 +282,13 @@ INIT_WITH_COMMON_CF {
}
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
// when device is slow and you are typing an item too much, a crash may happen
// because we try to push the same view multiple times - in that case we should
// do nothing but wait for device to respond again.
if (self.navigationController.topViewController == viewController) {
return;
}
[UINavigationControllerEx removeBackground:viewController.view];
[viewController view]; // Force view