projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d31750c
)
avoid crashing when accessing mapgen early (#5384)
author
zeuner
<github@quidecco.de>
Fri, 17 Mar 2017 20:28:43 +0000
(21:28 +0100)
committer
Loïc Blot
<nerzhul@users.noreply.github.com>
Fri, 17 Mar 2017 20:28:43 +0000
(21:28 +0100)
src/emerge.cpp
patch
|
blob
|
history
diff --git
a/src/emerge.cpp
b/src/emerge.cpp
index 8719a9eb37c9d0719db9d8af789d7784c5bd3207..a3efb09e78fd4190a98ace1cd8ad683b9591b7ac 100644
(file)
--- a/
src/emerge.cpp
+++ b/
src/emerge.cpp
@@
-174,6
+174,9
@@
bool EmergeManager::initMapgens(MapgenParams *params)
Mapgen *EmergeManager::getCurrentMapgen()
{
+ if (!m_threads_active)
+ return NULL;
+
for (u32 i = 0; i != m_threads.size(); i++) {
if (m_threads[i]->isCurrentThread())
return m_threads[i]->m_mapgen;