diff --git a/PreferencesManager.cs b/PreferencesManager.cs index c65b5fa..56a2c79 100644 --- a/PreferencesManager.cs +++ b/PreferencesManager.cs @@ -315,7 +315,7 @@ private T LoadPrefByScreen(int screenNum, string prefBaseName, string primary // look for the non-screen-specific pref setting, and if found, move it from there. // This is a one-off preferences upgrade. - if (Screen.AllScreens.Length == 1 || Screen.AllScreens.Length >= screenNum && Screen.AllScreens[screenNum].Primary) + if (Screen.AllScreens.Length == 1 || (screenNum < Screen.AllScreens.Length && Screen.AllScreens[screenNum].Primary)) { if (reg.GetValueNames().Contains(prefBaseName)) {