mirror of https://github.com/OpenTTD/OpenTTD
(svn r26053) -Fix: possible use-after-free
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