diff --git a/ArcFormats/ArcXP3.cs b/ArcFormats/ArcXP3.cs index 09aeb323..47a6f31e 100644 --- a/ArcFormats/ArcXP3.cs +++ b/ArcFormats/ArcXP3.cs @@ -721,11 +721,9 @@ NextEntry: { if (!disposed) { - m_file = null; - if (null != m_stream) + if (disposing && null != m_stream) { m_stream.Dispose(); - m_stream = null; } disposed = true; base.Dispose (disposing); diff --git a/ArcFormats/ImageGGP.cs b/ArcFormats/ImageGGP.cs index 14bab042..c28d06ca 100644 --- a/ArcFormats/ImageGGP.cs +++ b/ArcFormats/ImageGGP.cs @@ -169,7 +169,7 @@ namespace GameRes.Formats.DRS { if (!m_disposed) { - if (m_should_dispose) + if (m_should_dispose && disposing) m_stream.Dispose(); m_disposed = true; base.Dispose (disposing);