Fix Null reference Exception in NodeState for AccessRestrictions (#2894)

* fix cast that throws when Enum is null
This commit is contained in:
romanett
2024-12-11 08:48:09 +01:00
committed by GitHub
parent 67a0df1960
commit f431d53c89
+1 -1
View File
@@ -3667,7 +3667,7 @@ namespace Opc.Ua
result = onReadAccessRestrictions(context, this, ref accessRestrictions);
}
if (ServiceResult.IsGood(result))
if (ServiceResult.IsGood(result) && accessRestrictions != null)
{
value = (ushort)accessRestrictions;
}