From 4db06b3adc11ce5dd3dde274198af37ae4848a67 Mon Sep 17 00:00:00 2001 From: kevinjhang Date: Wed, 8 Aug 2018 15:22:10 +0800 Subject: [PATCH] Fix NullReferenceException (#517) When throw this exception, It will block bad quality reporting. --- ComIOP/Common/Client/Da/ComDaGroup.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ComIOP/Common/Client/Da/ComDaGroup.cs b/ComIOP/Common/Client/Da/ComDaGroup.cs index 30f44717bb..000a083901 100644 --- a/ComIOP/Common/Client/Da/ComDaGroup.cs +++ b/ComIOP/Common/Client/Da/ComDaGroup.cs @@ -220,7 +220,8 @@ namespace Opc.Ua.Com.Client for (int jj = 0; jj < monitoredItems.Length; jj++) { - if (info.LastValue.Value.GetType().IsArray + if (info.LastValue.Value != null + && info.LastValue.Value.GetType().IsArray && monitoredItems[jj].IndexRange.Count != info.LastValue.Value.GetType().GetArrayRank() && StatusCode.IsBad(info.LastValue.StatusCode)) {