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;