From 0ae86d05582d0c53312b2c1ba63d4e5a71babb34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Mon, 21 Sep 2020 04:13:10 +0200 Subject: [PATCH] Don't use empty resolutions (#12980) --- src/openrct2-ui/UiContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 001c4b4abc..816904e50a 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -758,7 +758,7 @@ private: resolutions.erase(last, resolutions.end()); // Update config fullscreen resolution if not set - if (gConfigGeneral.fullscreen_width == -1 || gConfigGeneral.fullscreen_height == -1) + if (!resolutions.empty() && (gConfigGeneral.fullscreen_width == -1 || gConfigGeneral.fullscreen_height == -1)) { gConfigGeneral.fullscreen_width = resolutions.back().Width; gConfigGeneral.fullscreen_height = resolutions.back().Height;