Fix NullReferenceException (#517)

When throw this exception,
It will block bad quality reporting.
This commit is contained in:
kevinjhang
2018-08-08 10:22:10 +03:00
committed by Alin Moldovean
parent 3c93ad36c7
commit 4db06b3adc
+2 -1
View File
@@ -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))
{