diff --git a/iphone/Maps/Classes/MapDownloader/MWMBaseMapDownloaderViewController.mm b/iphone/Maps/Classes/MapDownloader/MWMBaseMapDownloaderViewController.mm index 2502f4ec08..391d7e676b 100644 --- a/iphone/Maps/Classes/MapDownloader/MWMBaseMapDownloaderViewController.mm +++ b/iphone/Maps/Classes/MapDownloader/MWMBaseMapDownloaderViewController.mm @@ -501,6 +501,11 @@ using namespace storage; - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { + if (buttonIndex >= actionSheet.numberOfButtons) + { + [actionSheet dismissWithClickedButtonIndex:0 animated:NO]; + return; + } NSString * btnTitle = [actionSheet buttonTitleAtIndex:buttonIndex]; if ([btnTitle hasPrefix:kDownloadActionTitle]) [self downloadNode:m_actionSheetId];