From 386807a9e22cae98372ecfa47eda97656bdcaafe Mon Sep 17 00:00:00 2001 From: rachytski Date: Thu, 8 Sep 2011 12:43:37 +0300 Subject: [PATCH] synchronized access to m_currentRenderCommand. closes #329 --- map/render_queue_routine.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/map/render_queue_routine.cpp b/map/render_queue_routine.cpp index a6a3315be6..94a2f9e9af 100644 --- a/map/render_queue_routine.cpp +++ b/map/render_queue_routine.cpp @@ -431,11 +431,14 @@ void RenderQueueRoutine::Do() /// in the endFrame function /// updateActualTarget(); - m_currentRenderCommand.reset(); - + threads::ConditionGuard g1(m_hasRenderCommands); { - threads::MutexGuard guard(*m_renderState->m_mutex.get()); - m_renderState->m_duration = duration; + m_currentRenderCommand.reset(); + + { + threads::MutexGuard g2(*m_renderState->m_mutex.get()); + m_renderState->m_duration = duration; + } } invalidate();