summaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2005-01-11 12:15:08 +0000
committercelestar <celestar@openttd.org>2005-01-11 12:15:08 +0000
commit1feae2083d6c1a8c7c1470149b190476793376cb (patch)
treee79f6aa60d77e1aa79491ffc915617be61fc9d2c /window.c
parent5fac6142e849c08279a893f24fe50e5840e94813 (diff)
downloadopenttd-1feae2083d6c1a8c7c1470149b190476793376cb.tar.xz
(svn r1481) -Fix: [ 1099891 ] Added a return in DispatchLeftClickEvent which prevents reading of free'd memory (tamlin)
Diffstat (limited to 'window.c')
-rw-r--r--window.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/window.c b/window.c
index fd7a00ecc..86af083e0 100644
--- a/window.c
+++ b/window.c
@@ -53,6 +53,7 @@ void DispatchLeftClickEvent(Window *w, int x, int y) {
if (w->desc_flags & WDF_STD_BTN) {
if (e.click.widget == 0) {
DeleteWindow(w);
+ return;
} else {
if (e.click.widget == 1) {
StartWindowDrag(w);