From 7e4c56ce0d568ff5489467c25f3b2b69ca580d87 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Mon, 2 Nov 2015 18:21:35 +0000 Subject: Fix deadlock, resolves #2521 --- src/SpawnPrepare.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SpawnPrepare.cpp b/src/SpawnPrepare.cpp index e332d3b1a..9f1e645b1 100644 --- a/src/SpawnPrepare.cpp +++ b/src/SpawnPrepare.cpp @@ -64,7 +64,10 @@ void cSpawnPrepare::PrepareChunks(cWorld & a_World, int a_SpawnChunkX, int a_Spa } // for i // Wait for the lighting thread to prepare everything. Event is set in the Call() callback: - prep.m_EvtFinished.Wait(); + if (MaxIdx > 0) + { + prep.m_EvtFinished.Wait(); + } } -- cgit v1.2.3