summaryrefslogtreecommitdiff
path: root/genworld_gui.c
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2006-12-03 13:06:49 +0000
committerrubidium <rubidium@openttd.org>2006-12-03 13:06:49 +0000
commit306204c71d15cf5e7e8fab62dd470a4dde5c76b3 (patch)
tree28cd19c26706bfd9cfaa5adbffd91666b45cda68 /genworld_gui.c
parent7395780daf6fdbee4d423c5a260c7e70559f340b (diff)
downloadopenttd-306204c71d15cf5e7e8fab62dd470a4dde5c76b3.tar.xz
(svn r7328) -Fix: memory corruption. The 'Load Heightmap' window does not have TerraGenesis configuration buttons and it does have only 29 widgets, not at least 33. Thanks to Tefad for finding this bug.
Diffstat (limited to 'genworld_gui.c')
-rw-r--r--genworld_gui.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/genworld_gui.c b/genworld_gui.c
index ad51d3fdf..571dec4f9 100644
--- a/genworld_gui.c
+++ b/genworld_gui.c
@@ -206,8 +206,10 @@ void GenerateLandscapeWndProc(Window *w, WindowEvent *e)
case WE_PAINT:
/* You can't select smoothness if not terragenesis */
- SetWindowWidgetDisabledState(w, 32, _patches_newgame.land_generator == 0);
- SetWindowWidgetDisabledState(w, 33, _patches_newgame.land_generator == 0);
+ if (mode == GLWP_GENERATE) {
+ SetWindowWidgetDisabledState(w, 32, _patches_newgame.land_generator == 0);
+ SetWindowWidgetDisabledState(w, 33, _patches_newgame.land_generator == 0);
+ }
/* Disable snowline if not hilly */
SetWindowWidgetDisabledState(w, 22, _opt_newgame.landscape != LT_HILLY);
/* Disable town and industry in SE */