diff options
author | rubidium <rubidium@openttd.org> | 2013-11-22 21:45:28 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-11-22 21:45:28 +0000 |
commit | 33626064011336529c2bda2a1b4d702c635d0564 (patch) | |
tree | ea8b0b897a03d432587da46591242870c017f19a /src | |
parent | 83a76c73c7b79650e46361f4576d7709c3a771b0 (diff) | |
download | openttd-33626064011336529c2bda2a1b4d702c635d0564.tar.xz |
(svn r26053) -Fix: possible use-after-free
Diffstat (limited to 'src')
-rw-r--r-- | src/newgrf_gui.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index 3250ead8d..61c6b678c 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -991,6 +991,8 @@ struct NewGRFWindow : public Window, NewGRFScanCallback { if (newsel == NULL && c->next == this->active_sel) newsel = c; if (c == this->active_sel) { + if (newsel == c) newsel = NULL; + *pc = c->next; delete c; break; |