Skip to content

Commit 07b1743

Browse files
red-001SmallJoker
authored andcommittedJun 22, 2018
Fix crash caused by Lua error during startup (#7473)
1 parent c66d977 commit 07b1743

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎src/emerge.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,10 @@ EmergeManager::~EmergeManager()
169169
}
170170

171171
delete thread;
172-
delete m_mapgens[i];
172+
173+
// Mapgen init might not be finished if there is an error during startup.
174+
if (m_mapgens.size() > i)
175+
delete m_mapgens[i];
173176
}
174177

175178
delete biomemgr;

0 commit comments

Comments
 (0)
Please sign in to comment.