(ViewPointer.Value): check for disposed state.

This commit is contained in:
morkt 2016-12-17 18:44:41 +04:00
parent ddff997522
commit bd037316c3

View File

@ -778,7 +778,16 @@ namespace GameRes
m_ptr = m_view.GetPointer (offset);
}
public byte* Value { get { return m_ptr; } }
public byte* Value
{
get
{
if (!_disposed)
return m_ptr;
else
throw new ObjectDisposedException ("Access to disposed ViewPointer object failed.");
}
}
#region IDisposable Members
bool _disposed = false;