Fixed a bug in emptying valves initialization on StateMachine startup

This commit is contained in:
Milan Hanajik
2014-09-06 11:35:10 +02:00
parent ef8284586e
commit a6f5b287c9
3 changed files with 8 additions and 11 deletions
@@ -33,8 +33,8 @@ namespace TBF.BenchControl.Elde.Valve
get
{
int max = 0;
foreach (var vlv in VOpen) if (vlv.Delay > max) max = vlv.Delay;
foreach (var vlv in VClose) if (vlv.Delay > max) max = vlv.Delay;
foreach (var vlv in VOpen) if ((vlv != null) && (vlv.Delay > max)) max = vlv.Delay;
foreach (var vlv in VClose) if ((vlv != null) && (vlv.Delay > max)) max = vlv.Delay;
return max;
}
}