diff --git a/dotnet/IEC61850forCSharp/ReportControlBlock.cs b/dotnet/IEC61850forCSharp/ReportControlBlock.cs index 0abae209..9e6daecf 100644 --- a/dotnet/IEC61850forCSharp/ReportControlBlock.cs +++ b/dotnet/IEC61850forCSharp/ReportControlBlock.cs @@ -742,14 +742,19 @@ namespace IEC61850 /// /// Gets the current owner of the RCB /// - /// The owner information + /// The owner information, or null when no owner information is available. public byte[] GetOwner() { IntPtr mmsValuePtr = ClientReportControlBlock_getOwner(self); - MmsValue octetStringVal = new MmsValue(mmsValuePtr); + if (mmsValuePtr != IntPtr.Zero) + { + MmsValue octetStringVal = new MmsValue(mmsValuePtr); - return octetStringVal.getOctetString(); + return octetStringVal.getOctetString(); + } + else + return null; } }