Skip to content


avoid crashing when accessing mapgen early (#5384)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeuner authored and nerzhul committed Mar 17, 2017
1 parent d31750c commit ba0a8da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/emerge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ba0a8da

Please sign in to comment.