Skip to content
Permalink
Browse files

avoid crashing when accessing mapgen early (#5384)

  • Loading branch information...
zeuner authored and nerzhul committed Mar 17, 2017
1 parent d31750c commit ba0a8dabeff92ecd87d28b4b5b4010e958be5851
Showing with 3 additions and 0 deletions.
  1. +3 −0 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;

0 comments on commit ba0a8da

Please sign in to comment.
You can’t perform that action at this time.