Balance crash on program shut-down avoided.

This commit is contained in:
Milan Hanajik
2017-03-09 15:03:42 +01:00
parent f9c8c22d5e
commit e93a817d4d
@@ -447,11 +447,14 @@ namespace TBF.BenchControl.MettlerToledo.Standard
/// <summary>Stop this device</summary>
public void StopDevice()
{
if (serialPort != null)
{
serialPort.Close();
serialPort = null;
}
try
{
serialPort.Close();
serialPort = null;
}
catch
{
}
}
/// <summary>