Skip to content

Commit

Permalink
Fix NullReferenceException when trying to get a binary stream from a …
Browse files Browse the repository at this point in the history
…record which does not have one
  • Loading branch information
gusbro committed Apr 22, 2022
1 parent 1fb7950 commit 6c90df4
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ public byte GetByte(int i)
public long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length)
{
MemoryStream ms = GetAttValue(i).B;
if (ms == null)
return 0;
ms.Seek(fieldOffset, SeekOrigin.Begin);
return ms.Read(buffer, bufferoffset, length);
}
Expand Down

0 comments on commit 6c90df4

Please sign in to comment.