mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-22 17:50:03 +08:00
Fix Null reference Exception in NodeState for AccessRestrictions (#2894)
* fix cast that throws when Enum is null
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user