[cherry] [release-74-fix] [ios] Fixed crash on no action bar buttons.

This commit is contained in:
Ilya Grechuhin 2017-07-21 14:11:34 +03:00 committed by Roman Kuznetsov
parent 5c6ad3443c
commit dc67029405

View file

@ -222,9 +222,9 @@ extern NSString * const kAlohalyticsTapEventKey;
for (UIView * view in self.buttons)
{
NSAssert(view.subviews.count, @"Subviews can't be empty!");
MWMActionBarButton * button = view.subviews[0];
if (button.type != EButton::Download)
MWMActionBarButton * button = view.subviews.firstObject;
NSAssert(button, @"Subviews can't be empty!");
if (!button || button.type != EButton::Download)
continue;
return button.mapDownloadProgress;