1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Mgflat, Mgv7: Fix noise crash on world exit.

Fix crash caused by destructor 'delete' on noise objects that are not
created due to mapgen options.
Crash was caused by commit 57eaf62c69
This commit is contained in:
paramat 2017-04-22 05:16:50 +01:00
parent f6d1b682d3
commit 4c03190ce8
2 changed files with 20 additions and 8 deletions

View file

@ -73,8 +73,10 @@ MapgenFlat::MapgenFlat(int mapgenid, MapgenFlatParams *params, EmergeManager *em
MapgenFlat::~MapgenFlat()
{
delete noise_terrain;
delete noise_filler_depth;
if ((spflags & MGFLAT_LAKES) || (spflags & MGFLAT_HILLS))
delete noise_terrain;
}