From e3193e7b9e02cc98107d7de861844fbbe14f9337 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 25 Apr 2021 00:12:57 +0100 Subject: [PATCH] Fix #248: Crash in debug window -> parent button for non-GRF industries --- src/table/newgrf_debug_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/table/newgrf_debug_data.h b/src/table/newgrf_debug_data.h index eb38795b5c..6a07c1123e 100644 --- a/src/table/newgrf_debug_data.h +++ b/src/table/newgrf_debug_data.h @@ -619,7 +619,7 @@ class NIHIndustry : public NIHelper { const void *GetInstance(uint index)const override { return Industry::Get(index); } const void *GetSpec(uint index) const override { return GetIndustrySpec(Industry::Get(index)->type); } void SetStringParameters(uint index) const override { this->SetSimpleStringParameters(STR_INDUSTRY_NAME, index); } - uint32 GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? GetIndustrySpec(Industry::Get(index)->type)->grf_prop.grffile->grfid : 0; } + uint32 GetGRFID(uint index) const override { return (!this->ShowExtraInfoOnly(index)) ? GetIndustrySpec(Industry::Get(index)->type)->grf_prop.grffile->grfid : 0; } uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override {