Fix crash on drive scan

This commit is contained in:
Matt Nadareski
2020-12-31 13:39:19 -08:00
parent 33e73a8992
commit eab3e25cf2

View File

@@ -188,7 +188,7 @@ namespace MPF.Windows
/// </summary>
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);