summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-05-28 06:30:55 +0000
committerpeter1138 <peter1138@openttd.org>2008-05-28 06:30:55 +0000
commit504d0d1ae5aad221ab1e0e23f060f0ff5e6f103a (patch)
treee7c13dd7cc6c03bc4ca3ab96dabd48938a0211a3 /src
parente15863fa7785583291ae2d03ccbdf5b3e8377047 (diff)
downloadopenttd-504d0d1ae5aad221ab1e0e23f060f0ff5e6f103a.tar.xz
(svn r13305) -Fix (r13039): Confirmation window sent both yes and no answers instead of just yes.
Diffstat (limited to 'src')
-rw-r--r--src/misc_gui.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index ac64a4fcc..24829904c 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -1208,6 +1208,8 @@ struct QueryWindow : public Window {
* DeleteNonVitalWindows() to be called - we shouldn't be in a window then */
QueryCallbackProc *proc = this->proc;
Window *parent = this->parent;
+ /* Prevent the destructor calling the callback function */
+ this->proc = NULL;
delete this;
if (proc != NULL) {
proc(parent, true);