mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 17:35:37 +02: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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user