diff --git a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs index 78cffbffb..e301f9afb 100644 --- a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs +++ b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs @@ -892,7 +892,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication { ihead.CommFailed = true; - if ((wm.ResultCode & (int)Results.Entities.ResultCode.RfidErrorCodeMask) == 0) + if (wm != null && (wm.ResultCode & (int)Results.Entities.ResultCode.RfidErrorCodeMask) == 0) { wm.ResultCode |= (((int)error << 16) | ((int)tests[i].ItemNr << 20)); } @@ -903,7 +903,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication { ihead.CommFailed = true; - if ((wm.ResultCode & (int)Results.Entities.ResultCode.RfidErrorCodeMask) == 0) + if (wm != null && (wm.ResultCode & (int)Results.Entities.ResultCode.RfidErrorCodeMask) == 0) { wm.ResultCode |= (((int)error << 16) | ((int)tests[i].ItemNr << 20)); }