diff options
author | Patric Stout <truebrain@openttd.org> | 2021-03-09 15:21:57 +0100 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-03-10 13:41:18 +0100 |
commit | 5426cb3baf924f541bccf57aa97c6d4473546f09 (patch) | |
tree | 8104d9812c1591da5bba3f79d8e843e043890481 /src/openttd.cpp | |
parent | b349ef6e714db1a3097f813b25373188ac627e2c (diff) | |
download | openttd-5426cb3baf924f541bccf57aa97c6d4473546f09.tar.xz |
Fix: abort GRFFileScanner on exiting the game as soon as possible
This prevents the window from "freezing" when you close it during
the scanning of NewGRFs, as it first would continue the action.
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r-- | src/openttd.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index 035e8e5ae..235d36f01 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1469,6 +1469,8 @@ void GameLoop() ScanNewGRFFiles(_request_newgrf_scan_callback); _request_newgrf_scan = false; _request_newgrf_scan_callback = nullptr; + /* In case someone closed the game during our scan, don't do anything else. */ + if (_exit_game) return; } ProcessAsyncSaveFinish(); |