[ios] Workaround for ios 7 crash.

This commit is contained in:
Ilya Grechuhin 2016-06-29 10:42:56 +03:00
parent cd6395349a
commit d2bea46dbd

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;