From f5c77b2100b95927d3520da0e5f443f2d3231e15 Mon Sep 17 00:00:00 2001 From: ExMix Date: Tue, 14 Oct 2014 16:12:14 +0300 Subject: [PATCH] [core] bug fix. Stop routing call when route building faild. In this case we don't change mode on location state --- map/location_state.cpp | 10 ++++++---- 1 file 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()