summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-03-09 20:19:27 +0100
committerPatric Stout <github@truebrain.nl>2021-03-10 13:41:18 +0100
commit14b61bfa6fb6812bdc9739402956c3dfa3a4c12b (patch)
treeb6b82efcd0e92cd227a36d17908cefc21bf8c34e
parentafadae6d5068d39e1e4bb12b9d7f7a1632a0638f (diff)
downloadopenttd-14b61bfa6fb6812bdc9739402956c3dfa3a4c12b.tar.xz
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.
-rw-r--r--src/newgrf_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index 4e63eafbe..9ed21e5c5 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -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();