Merge pull request #3682 from igrechuhin/ios7-workaround

[ios] Workaround for ios 7 crash.
This commit is contained in:
Vladimir Byko-Ianko 2016-06-29 10:45:24 +03:00 committed by GitHub
commit 53e10e7cf4

View file

@ -662,7 +662,7 @@ using namespace mwm;
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (actionSheet.numberOfButtons == 0 || buttonIndex >= actionSheet.numberOfButtons)
if (actionSheet.numberOfButtons == 0 || buttonIndex >= actionSheet.numberOfButtons || buttonIndex < 0)
{
[actionSheet dismissWithClickedButtonIndex:0 animated:NO];
return;