diff options
author | ExMix <rahuba.youri@mapswithme.com> | 2014-10-14 17:12:14 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:30:34 +0300 |
commit | f5c77b2100b95927d3520da0e5f443f2d3231e15 (patch) | |
tree | 6af8102ef5ef7e221a1a47897289b34d45c74d5c /map/location_state.cpp | |
parent | a2c08956fa37f84cd62df967f34670a35086efa6 (diff) |
[core] bug fix. Stop routing call when route building faild. In this case we don't change mode on location state
Diffstat (limited to 'map/location_state.cpp')
-rw-r--r-- | map/location_state.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/map/location_state.cpp b/map/location_state.cpp index 423124e21d..7251119442 100644 --- a/map/location_state.cpp +++ b/map/location_state.cpp @@ -340,10 +340,12 @@ void State::StartRouteFollow() void State::StopRoutingMode() { - ASSERT(IsInRouting(), ()); - SetModeInfo(ChangeMode(ExcludeModeBit(m_modeInfo, RoutingSessionBit), GetMode() == RotateAndFollow ? Follow : NotFollow)); - RotateOnNorth(); - AnimateFollow(); + if (IsInRouting()) + { + SetModeInfo(ChangeMode(ExcludeModeBit(m_modeInfo, RoutingSessionBit), GetMode() == RotateAndFollow ? Follow : NotFollow)); + RotateOnNorth(); + AnimateFollow(); + } } void State::TurnOff() |