diff --git a/iphone/Maps/Bookmarks/BookmarksVC.mm b/iphone/Maps/Bookmarks/BookmarksVC.mm index 0c9617fa2d..7ce2aa0b0b 100644 --- a/iphone/Maps/Bookmarks/BookmarksVC.mm +++ b/iphone/Maps/Bookmarks/BookmarksVC.mm @@ -579,7 +579,6 @@ CGFloat const kPinDiameter = 18.0f; - (void)categorySettingsController:(CategorySettingsViewController *)viewController didDelete:(MWMMarkGroupID)categoryId { - [self.navigationController popViewControllerAnimated:YES]; [self.delegate bookmarksVCdidDeleteCategory:self]; } diff --git a/iphone/Maps/Bookmarks/Categories/BMCView/BMCViewController.swift b/iphone/Maps/Bookmarks/Categories/BMCView/BMCViewController.swift index 25b81f8db5..7eb7998c87 100644 --- a/iphone/Maps/Bookmarks/Categories/BMCView/BMCViewController.swift +++ b/iphone/Maps/Bookmarks/Categories/BMCView/BMCViewController.swift @@ -380,6 +380,7 @@ extension BMCViewController: BookmarksVCDelegate { } func bookmarksVCdidDeleteCategory(_ viewController: BookmarksVC!) { - navigationController?.popViewController(animated: true) + guard let parentVC = parent else { return } + navigationController?.popToViewController(parentVC, animated: true) } }