Skip to content

Commit 4c8a0fa

Browse files
authored
Prevent possible crash on scan for input (#2314)
1 parent fd94528 commit 4c8a0fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

UI/Dialogs/InputConfigWizard.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ private void ScanforInput_OnButtonPressed(object sender, InputEventArgs e)
760760
return;
761761
}
762762

763-
var module = inputModuleNameComboBox.Items.Cast<ListItem>().Where(i => i.Value.ToString().Contains(e.Serial)).First();
763+
var module = inputModuleNameComboBox.Items.Cast<ListItem>().Where(i => i.Value.ToString().Contains(e.Serial)).FirstOrDefault();
764764

765765
if (module == null) { return; }
766766
inputModuleNameComboBox.SelectedItem = module;

0 commit comments

Comments
 (0)