diff options
author | red-001 <red-001@outlook.ie> | 2018-06-22 20:04:41 +0100 |
---|---|---|
committer | SmallJoker <SmallJoker@users.noreply.github.com> | 2018-06-22 21:04:41 +0200 |
commit | 07b1743d3db086f0f984968252d9e3ac71336a7e (patch) | |
tree | 044c064f3fbbd3be1d1908f60bfaa1a820512194 /src | |
parent | c66d97726931aa8dde7d8a1ffa5b8e41234f4660 (diff) | |
download | minetest-07b1743d3db086f0f984968252d9e3ac71336a7e.tar.gz minetest-07b1743d3db086f0f984968252d9e3ac71336a7e.tar.bz2 minetest-07b1743d3db086f0f984968252d9e3ac71336a7e.zip |
Fix crash caused by Lua error during startup (#7473)
Diffstat (limited to 'src')
-rw-r--r-- | src/emerge.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/emerge.cpp b/src/emerge.cpp index 277841053..592b1bef7 100644 --- a/src/emerge.cpp +++ b/src/emerge.cpp @@ -169,7 +169,10 @@ EmergeManager::~EmergeManager() } delete thread; - delete m_mapgens[i]; + + // Mapgen init might not be finished if there is an error during startup. + if (m_mapgens.size() > i) + delete m_mapgens[i]; } delete biomemgr; |