summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-27 15:35:47 +0000
committertruebrain <truebrain@openttd.org>2011-12-27 15:35:47 +0000
commit96e1f0a8f0c8bc9002ea0d18f1da7596e8f91afe (patch)
tree02089cf253bc3a61a48984034c728c534d9bf2a9 /src
parent0e6ca77e1aa9f9b3cdb7e7277e006446d435141f (diff)
downloadopenttd-96e1f0a8f0c8bc9002ea0d18f1da7596e8f91afe.tar.xz
(svn r23678) -Fix: close the editbox of settings when changing an AI, to avoid invalid memory read/write (reported by SmatZ)
Diffstat (limited to 'src')
-rw-r--r--src/ai/ai_gui.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp
index 6b6e04280..7726417b4 100644
--- a/src/ai/ai_gui.cpp
+++ b/src/ai/ai_gui.cpp
@@ -174,6 +174,7 @@ struct AIListWindow : public Window {
}
InvalidateWindowData(WC_GAME_OPTIONS, WN_GAME_OPTIONS_AI);
InvalidateWindowClassesData(WC_AI_SETTINGS);
+ DeleteWindowByClass(WC_QUERY_STRING);
}
virtual void OnClick(Point pt, int widget, int click_count)