mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-22 22:19:08 +00:00
(svn r26053) -Fix: possible use-after-free
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user