From 889a370f908beff2af9b72a3060db967cf4573e3 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Fri, 13 Nov 2020 10:31:30 +0100 Subject: [PATCH] iPerlCommunicationForm bug fix : Crash when swithing to Active mode after saving results. --- .../TestMethods/iPerlCommunication/iPerlCommunicationForm.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)); }