forked from organicmaps/organicmaps
[ios] Fixed assert when controller is there but in a wrong order
Reproduced by opening Downloader and zooming to any downloaded country. Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
parent
f5c9d89eeb
commit
142e891e16
1 changed files with 4 additions and 4 deletions
|
@ -333,10 +333,10 @@ using namespace osm_auth_ios;
|
|||
#pragma mark - Properties
|
||||
|
||||
- (MapViewController *)mapViewController {
|
||||
auto obj = [(UINavigationController *)self.window.rootViewController viewControllers].firstObject;
|
||||
if ([obj isKindOfClass:[MapViewController class]])
|
||||
return obj;
|
||||
|
||||
for (id vc in [(UINavigationController *)self.window.rootViewController viewControllers]) {
|
||||
if ([vc isKindOfClass:[MapViewController class]])
|
||||
return vc;
|
||||
}
|
||||
NSAssert(false, @"Please check the logic");
|
||||
return nil;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue