Account for FrostedSerialPort.GetPortNames() having zero items, don't filter 002/002

This commit is contained in:
John Lewin 2015-02-02 12:46:28 -08:00
parent 0af9175f97
commit b3a9afcd94
2 changed files with 5 additions and 4 deletions

View file

@ -1441,7 +1441,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication
// On Android, there will never be more than one serial port available for us to connect to. Override the current .ComPort value to account for
// this aspect to ensure the validation logic that verifies port availablity/in use status can proceed without additional workarounds for Android
#if __ANDROID__
string currentPortName = FrostedSerialPort.GetPortNames().Where(p => p != "/dev/bus/usb/002/002").FirstOrDefault();
string currentPortName = FrostedSerialPort.GetPortNames().FirstOrDefault();
if(!string.IsNullOrEmpty(currentPortName))
{