summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 6834af4fd5..53b88d9f57 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1224,7 +1224,12 @@ void LLFloaterPreference::applyResolution()
S32 num_resolutions;
LLWindow::LLWindowResolution* supported_resolutions =
gViewerWindow->getWindow()->getSupportedResolutions(num_resolutions);
- U32 resIndex = getChild<LLComboBox>("fullscreen combo")->getCurrentIndex();
+ S32 resIndex = getChild<LLComboBox>("fullscreen combo")->getCurrentIndex();
+ if (resIndex == -1)
+ {
+ // use highest resolution if nothing selected
+ resIndex = num_resolutions - 1;
+ }
gSavedSettings.setS32("FullScreenWidth", supported_resolutions[resIndex].mWidth);
gSavedSettings.setS32("FullScreenHeight", supported_resolutions[resIndex].mHeight);