summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/World.cpp')
-rw-r--r--src/World.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/World.cpp b/src/World.cpp
index a23db6242..f616063f5 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -1067,12 +1067,13 @@ void cWorld::TickScheduledTasks(void)
cScheduledTasks Tasks;
{
cCSLock Lock(m_CSScheduledTasks);
+ auto WorldAge = m_WorldAge;
std::move(
m_ScheduledTasks.begin(),
std::find_if(
m_ScheduledTasks.begin(),
m_ScheduledTasks.end(),
- [m_WorldAge] (std::unique_ptr<cScheduledTask>& Task) { return Task->m_TargetTick < m_WorldAge;}),
+ [WorldAge] (std::unique_ptr<cScheduledTask>& Task) { return Task->m_TargetTick < m_WorldAge;}),
std::back_inserter(Tasks));
}