[MAPSME-6479] [ios] Fixed crash on iPad stop routing.

This commit is contained in:
Ilya Grechuhin 2018-01-16 15:13:43 +03:00 committed by Roman Kuznetsov
parent 326e21855d
commit f0827cc2dd

View file

@ -152,7 +152,6 @@ using Observers = NSHashTable<Observer>;
- (void)stateHidden
{
self.taxiDataSource = nil;
[self.routePreview remove];
self.routePreview = nil;
self.navigationInfoView.state = MWMNavigationInfoViewStateHidden;
self.navigationInfoView = nil;
@ -237,7 +236,6 @@ using Observers = NSHashTable<Observer>;
- (void)onRouteStop { self.state = MWMNavigationDashboardStateHidden; }
- (void)stateNavigation
{
[self.routePreview remove];
self.routePreview = nil;
self.navigationInfoView.state = MWMNavigationInfoViewStateNavigation;
self.navigationControlView.isVisible = YES;
@ -390,6 +388,7 @@ using Observers = NSHashTable<Observer>;
return _taxiDataSource;
}
@synthesize routePreview = _routePreview;
- (MWMRoutePreview *)routePreview
{
if (!_routePreview)
@ -397,6 +396,14 @@ using Observers = NSHashTable<Observer>;
return _routePreview;
}
- (void)setRoutePreview:(MWMRoutePreview *)routePreview
{
if (routePreview == _routePreview)
return;
[_routePreview remove];
_routePreview = routePreview;
}
- (MWMBaseRoutePreviewStatus *)baseRoutePreviewStatus
{
if (!_baseRoutePreviewStatus)