summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 35a5fe49c..17e6e46cd 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -26,6 +26,7 @@
#include "newgrf.h"
#include "newgrf_cargo.h"
#include "newgrf_commons.h"
+#include "newgrf_debug.h"
#include "newgrf_industries.h"
#include "newgrf_industrytiles.h"
#include "autoslope.h"
@@ -141,6 +142,8 @@ Industry::~Industry()
TILE_AREA_LOOP(tile_cur, this->location) {
if (IsTileType(tile_cur, MP_INDUSTRY)) {
if (GetIndustryIndex(tile_cur) == this->index) {
+ DeleteNewGRFInspectWindow(GSF_INDUSTRYTILES, tile_cur);
+
/* MakeWaterKeepingClass() can also handle 'land' */
MakeWaterKeepingClass(tile_cur, OWNER_NONE);
@@ -173,6 +176,7 @@ Industry::~Industry()
DeleteIndustryNews(this->index);
DeleteWindowById(WC_INDUSTRY_VIEW, this->index);
+ DeleteNewGRFInspectWindow(GSF_INDUSTRIES, this->index);
DeleteSubsidyWith(ST_INDUSTRY, this->index);
CargoPacket::InvalidateAllFrom(ST_INDUSTRY, this->index);