changeset 14341:a19feda8e58a draft

(svn r18896) -Fix [FS#3558]: pressing cancel for the query windows of the world generation window caused the default to be set instead of no changes to the value
author rubidium <rubidium@openttd.org>
date Sat, 23 Jan 2010 15:53:09 +0000
parents 673cb6667462
children 276474ed1fe0
files src/genworld_gui.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -732,6 +732,9 @@
 
 	virtual void OnQueryTextFinished(char *str)
 	{
+		/* Was 'cancel' pressed? */
+		if (str == NULL) return;
+
 		int32 value;
 		if (!StrEmpty(str)) {
 			value = atoi(str);