summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_gui.cpp2
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;