diff --git a/map/routing_manager.cpp b/map/routing_manager.cpp index fffc907617..9fb4054324 100644 --- a/map/routing_manager.cpp +++ b/map/routing_manager.cpp @@ -407,7 +407,11 @@ void RoutingManager::SetRouterImpl(RouterType type) void RoutingManager::RemoveRoute(bool deactivateFollowing) { - m_bmManager->GetEditSession().ClearGroup(UserMark::Type::TRANSIT); + GetPlatform().RunTask(Platform::Thread::Gui, [this]() + { + m_bmManager->GetEditSession().ClearGroup(UserMark::Type::TRANSIT); + }); + if (deactivateFollowing) SetPointsFollowingMode(false /* enabled */); diff --git a/map/transit/transit_display.cpp b/map/transit/transit_display.cpp index c6def25bb5..69dfd2a1b3 100644 --- a/map/transit/transit_display.cpp +++ b/map/transit/transit_display.cpp @@ -402,7 +402,10 @@ void TransitRouteDisplay::ProcessSubroute(vector const & segments, m_routeInfo.m_totalDistInMeters = prevDistance; m_routeInfo.m_totalTimeInSec = static_cast(ceil(prevTime)); - CreateTransitMarks(transitMarks); + GetPlatform().RunTask(Platform::Thread::Gui, [this, transitMarks]() + { + CreateTransitMarks(transitMarks); + }); } void TransitRouteDisplay::CollectTransitDisplayInfo(vector const & segments,