diff --git a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm index 4f444f07d0..c84e4e3732 100644 --- a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm +++ b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm @@ -20,7 +20,7 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController + (nonnull MWMAlertViewController *)activeAlertController { - UIViewController * tvc = [UIViewController topViewController]; + UIViewController * tvc = [MapViewController sharedController]; ASSERT([tvc conformsToProtocol:@protocol(MWMController)], ()); UIViewController * mwmController = static_cast *>(tvc);