(svn r26053) -Fix: possible use-after-free

This commit is contained in:
rubidium 2013-11-22 21:45:28 +00:00
parent 83a76c73c7
commit 3362606401

View File

@ -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;