From aa68f96324ab5779f9edefcecc70f4643fcfcae3 Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Thu, 29 Oct 2015 18:18:04 +0300 Subject: [PATCH] Bugfix. Using atomic intead of direct calls for RoutingSession::m_state which is used at least from 3 threads. --- routing/routing_session.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routing/routing_session.hpp b/routing/routing_session.hpp index a8e5c971e3..2cf6443fac 100644 --- a/routing/routing_session.hpp +++ b/routing/routing_session.hpp @@ -14,6 +14,7 @@ #include "base/deferred_task.hpp" #include "base/mutex.hpp" +#include "std/atomic.hpp" #include "std/limits.hpp" #include "std/unique_ptr.hpp" @@ -144,7 +145,7 @@ private: private: unique_ptr m_router; Route m_route; - State m_state; + atomic m_state; m2::PointD m_endPoint; size_t m_lastWarnedSpeedCameraIndex; SpeedCameraRestriction m_lastCheckedCamera;