mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 02:19:41 +00:00
(svn r26053) -Fix: possible use-after-free
This commit is contained in:
parent
83a76c73c7
commit
3362606401
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user