(svn r7237) -Fix: TGP landscape generation could leak memory if aborted during the generation of the heightmap.

This commit is contained in:
rubidium
2006-11-22 14:14:02 +00:00
parent 62c13013a5
commit 3919198e4d
3 changed files with 19 additions and 0 deletions

3
tgp.c
View File

@@ -798,6 +798,8 @@ void GenerateTerrainPerlin(void)
uint x, y;
if (!AllocHeightMap()) return;
GenerateWorldSetAbortCallback(FreeHeightMap);
HeightMapGenerate();
IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
@@ -823,4 +825,5 @@ void GenerateTerrainPerlin(void)
for (x = 0; x < _height_map.size_x; x++) MakeVoid(_height_map.size_x * y + x);
FreeHeightMap();
GenerateWorldSetAbortCallback(NULL);
}