Skip to content

Commit ba0a8da

Browse files
zeunernerzhul
authored andcommittedMar 17, 2017
avoid crashing when accessing mapgen early (#5384)
1 parent d31750c commit ba0a8da

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎src/emerge.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ bool EmergeManager::initMapgens(MapgenParams *params)
174174

175175
Mapgen *EmergeManager::getCurrentMapgen()
176176
{
177+
if (!m_threads_active)
178+
return NULL;
179+
177180
for (u32 i = 0; i != m_threads.size(); i++) {
178181
if (m_threads[i]->isCurrentThread())
179182
return m_threads[i]->m_mapgen;

0 commit comments

Comments
 (0)
Please sign in to comment.