From eab3e25cf211563b80faab9c3141c2d2b96b03cd Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 31 Dec 2020 13:39:19 -0800 Subject: [PATCH] Fix crash on drive scan --- MPF/Windows/MainWindow.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MPF/Windows/MainWindow.xaml.cs b/MPF/Windows/MainWindow.xaml.cs index 5b5dccb1..3a256079 100644 --- a/MPF/Windows/MainWindow.xaml.cs +++ b/MPF/Windows/MainWindow.xaml.cs @@ -188,7 +188,7 @@ namespace MPF.Windows /// private void DetermineSystemType() { - if (!UIOptions.Options.SkipSystemDetection) + if (!UIOptions.Options.SkipSystemDetection && DriveLetterComboBox.SelectedIndex > -1) { ViewModels.LoggerViewModel.VerboseLog("Trying to detect system for drive {0}.. ", Drives[DriveLetterComboBox.SelectedIndex].Letter); var currentSystem = Validators.GetKnownSystem(Drives[DriveLetterComboBox.SelectedIndex]) ?? Converters.ToKnownSystem(UIOptions.Options.DefaultSystem);