diff options
author | Ilya Grechuhin <i.grechuhin@gmail.com> | 2017-07-21 14:11:34 +0300 |
---|---|---|
committer | Vlad Mihaylenko <vxmihaylenko@gmail.com> | 2017-07-21 14:16:45 +0300 |
commit | c00deae9af9e3e2d72b273d09ae99fff0ff6c940 (patch) | |
tree | 1ae4a38d9c60796ad8cf7ce182660d84394be31e | |
parent | d6ee74fb797626d2ff8f300f3c5af86ae2a5dff4 (diff) |
[release-74-fix] [ios] Fixed crash on no action bar buttons.
-rw-r--r-- | iphone/Maps/UI/PlacePage/PlacePageLayout/ActionBar/MWMPlacePageActionBar.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/ActionBar/MWMPlacePageActionBar.mm b/iphone/Maps/UI/PlacePage/PlacePageLayout/ActionBar/MWMPlacePageActionBar.mm index 90389480f6..56a7d9a9f4 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/ActionBar/MWMPlacePageActionBar.mm +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/ActionBar/MWMPlacePageActionBar.mm @@ -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; |