summaryrefslogtreecommitdiff
path: root/src/genworld_gui.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2014-12-18 18:20:59 +0000
committeralberth <alberth@openttd.org>2014-12-18 18:20:59 +0000
commit78896895cf23deead6ebffe6bcd615729a833d3a (patch)
treebde57b63ba75b2e7863c122a45ef968faf37232d /src/genworld_gui.cpp
parentedea2ce96d3f00ad16a6efbc9a63f7663f8ef640 (diff)
downloadopenttd-78896895cf23deead6ebffe6bcd615729a833d3a.tar.xz
(svn r27085) -Fix: Always return a valid window to the world generation gui code.
Diffstat (limited to 'src/genworld_gui.cpp')
-rw-r--r--src/genworld_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp
index 6ea4b5f62..603fef90d 100644
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -837,7 +837,8 @@ static void _ShowGenerateLandscape(GenenerateLandscapeWindowMode mode)
if (!GetHeightmapDimensions(_file_to_saveload.name, &x, &y)) return;
}
- GenerateLandscapeWindow *w = AllocateWindowDescFront<GenerateLandscapeWindow>((mode == GLWM_HEIGHTMAP) ? &_heightmap_load_desc : &_generate_landscape_desc, mode);
+ WindowDesc *desc = (mode == GLWM_HEIGHTMAP) ? &_heightmap_load_desc : &_generate_landscape_desc;
+ GenerateLandscapeWindow *w = AllocateWindowDescFront<GenerateLandscapeWindow>(desc, mode, true);
if (mode == GLWM_HEIGHTMAP) {
w->x = x;