Skip to content

Commit f431d53

Browse files
authored
Fix Null reference Exception in NodeState for AccessRestrictions (#2894)
* fix cast that throws when Enum is null
1 parent 67a0df1 commit f431d53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Stack/Opc.Ua.Core/Stack/State/NodeState.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3667,7 +3667,7 @@ protected virtual ServiceResult ReadNonValueAttribute(
36673667
result = onReadAccessRestrictions(context, this, ref accessRestrictions);
36683668
}
36693669

3670-
if (ServiceResult.IsGood(result))
3670+
if (ServiceResult.IsGood(result) && accessRestrictions != null)
36713671
{
36723672
value = (ushort)accessRestrictions;
36733673
}

0 commit comments

Comments
 (0)