1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 08:14:38 +01:00

Prevent a crash in headless mode when showing error

This commit is contained in:
Michał Janiszewski
2017-06-12 11:52:04 +02:00
committed by GitHub
parent 993f078a2a
commit 4547dfab95

View File

@@ -103,6 +103,11 @@ void window_error_open(rct_string_id title, rct_string_id message)
log_verbose("show error, %s", _window_error_text + 1);
// Don't do unnecessary work in headless. Also saves checking if cursor state is null.
if (gOpenRCT2Headless) {
return;
}
// Check if there is any text to display
if (dst == _window_error_text + 1)
return;