diff --git a/code/nel/tools/pipeline/service/module_pipeline_master.cpp b/code/nel/tools/pipeline/service/module_pipeline_master.cpp index 178b363fd..39fcced05 100644 --- a/code/nel/tools/pipeline/service/module_pipeline_master.cpp +++ b/code/nel/tools/pipeline/service/module_pipeline_master.cpp @@ -298,17 +298,23 @@ public: void handleUpdateTasks() { + IRunnable *currentRunnable; + { + NLMISC::CSynchronized>::CAccessor updateTasks(&m_UpdateTasks); + if (updateTasks.value().size() == 0) + return; + currentRunnable = updateTasks.value().front(); + } for (; ; ) { - IRunnable *currentRunnable; + currentRunnable->run(); { NLMISC::CSynchronized>::CAccessor updateTasks(&m_UpdateTasks); + updateTasks.value().pop_front(); if (updateTasks.value().size() == 0) break; currentRunnable = updateTasks.value().front(); - updateTasks.value().pop_front(); } - currentRunnable->run(); } }