Emergeblocks: Fix occasional crash
authorRogier <rogier777@gmail.com>
Mon, 25 Jul 2016 16:39:29 +0000 (18:39 +0200)
committerparamat <mat.gregory@virginmedia.com>
Sun, 16 Oct 2016 00:13:16 +0000 (01:13 +0100)
commit4b17105dc45976e399dab68f85b3030fa27f0ae2
treee4df3345d4c8af05427754db97ea6e66031088df
parentadad6e0a1c2bb6cd5e56db26d660fa9342cf0d0e
Emergeblocks: Fix occasional crash

Modification of the emergeblocks internal state was not protected
by a lock, causing a race condition.
This can be reproduced by repeatedly running emergeblocks for an
already-generated section of the map (with multiple emerge threads).
src/script/cpp_api/s_env.cpp
src/script/lua_api/l_env.cpp