diff options
Diffstat (limited to 'src/newgrf_debug_gui.cpp')
-rw-r--r-- | src/newgrf_debug_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_debug_gui.cpp b/src/newgrf_debug_gui.cpp index 4abfa4b1f..82c7a7d22 100644 --- a/src/newgrf_debug_gui.cpp +++ b/src/newgrf_debug_gui.cpp @@ -702,8 +702,8 @@ void ShowNewGRFInspectWindow(GrfSpecFeature feature, uint index, const uint32 gr if (!IsNewGRFInspectable(feature, index)) return; WindowNumber wno = GetInspectWindowNumber(feature, index); - NewGRFInspectWindow *w = AllocateWindowDescFront<NewGRFInspectWindow>(feature == GSF_TRAINS || feature == GSF_ROADVEHICLES ? &_newgrf_inspect_chain_desc : &_newgrf_inspect_desc, wno); - if (w == NULL) w = (NewGRFInspectWindow *)FindWindowById(WC_NEWGRF_INSPECT, wno); + WindowDesc *desc = (feature == GSF_TRAINS || feature == GSF_ROADVEHICLES) ? &_newgrf_inspect_chain_desc : &_newgrf_inspect_desc; + NewGRFInspectWindow *w = AllocateWindowDescFront<NewGRFInspectWindow>(desc, wno, true); w->SetCallerGRFID(grfid); } |