- fixed problem in C# MmsValue

pull/6/head
Michael Zillgith 11 years ago
parent 2f771f6e29
commit 424a3f3680

@ -336,7 +336,11 @@ namespace IEC61850
if ((type == MmsType.MMS_ARRAY) || (type == MmsType.MMS_STRUCTURE)) { if ((type == MmsType.MMS_ARRAY) || (type == MmsType.MMS_STRUCTURE)) {
if ((index >= 0) && (index < Size ())) { if ((index >= 0) && (index < Size ())) {
IntPtr value = MmsValue_getElement (valueReference, index); IntPtr value = MmsValue_getElement (valueReference, index);
return new MmsValue (value);
if (value == IntPtr.Zero)
return null;
else
return new MmsValue (value);
} else } else
throw new MmsValueException ("Index out of bounds"); throw new MmsValueException ("Index out of bounds");
} else } else

@ -202,7 +202,7 @@ namespace IEC61850
try { try {
if (this.report == null) if (this.report == null)
this.report = new Report (report); this.report = new Report (report);
if (reportHandler != null) if (reportHandler != null)
reportHandler(this.report, reportHandlerParameter); reportHandler(this.report, reportHandlerParameter);

Loading…
Cancel
Save