diff --git a/src/BizHawk.BizInvoke/MemoryBlock.cs b/src/BizHawk.BizInvoke/MemoryBlock.cs
index df81c12a46..8225216c6f 100644
--- a/src/BizHawk.BizInvoke/MemoryBlock.cs
+++ b/src/BizHawk.BizInvoke/MemoryBlock.cs
@@ -45,8 +45,10 @@ namespace BizHawk.BizInvoke
/// or end (= + - 1)
/// are outside [, ), the range of the block
///
+ /// disposed
public Stream GetStream(ulong start, ulong length, bool writer)
{
+ if (_pal == null) throw new ObjectDisposedException(nameof(MemoryBlock));
if (start < Start)
throw new ArgumentOutOfRangeException(nameof(start), start, "invalid address");
if (EndExclusive < start + length)
@@ -56,8 +58,10 @@ namespace BizHawk.BizInvoke
/// set r/w/x protection on a portion of memory. rounded to encompassing pages
/// failed to protect memory
+ /// disposed
public void Protect(ulong start, ulong length, Protection prot)
{
+ if (_pal == null) throw new ObjectDisposedException(nameof(MemoryBlock));
if (length == 0)
return;