Don't use empty resolutions (#12980)

This commit is contained in:
Michał Janiszewski authored and GitHub committed 2020-09-20 23:13:10 -03:00
1 parent 2c520b9b5b
commit 0ae86d0558
1 file changed
+1 -1
+1 -1
View File
@@ -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;