Fix #8833: don't reload NewGRFs when we are shutting down

Otherwise that might cause calls to the video-driver, which are
already shut down by now. This causes, depending on the video-driver
crashes or weird effects.
This commit is contained in:
Patric Stout
2021-03-09 20:19:27 +01:00
committed by Patric Stout
parent afadae6d50
commit 14b61bfa6f

View File

@@ -663,7 +663,7 @@ struct NewGRFWindow : public Window, NewGRFScanCallback {
DeleteWindowByClass(WC_TEXTFILE);
DeleteWindowByClass(WC_SAVE_PRESET);
if (this->editable && !this->execute) {
if (this->editable && !this->execute && !_exit_game) {
CopyGRFConfigList(this->orig_list, this->actives, true);
ResetGRFConfig(false);
ReloadNewGRFData();