[ios] Workaround for ios 7 crash.

This commit is contained in:
Ilya Grechuhin 2016-06-06 10:47:03 +03:00 committed by Vladimir Byko-Ianko
parent ccf60cdd34
commit cefd99d1b3

View file

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