fixed Dispose pattern.

This commit is contained in:
morkt 2015-07-02 03:22:22 +04:00
parent 8d5e1d602a
commit 526e813f74
2 changed files with 2 additions and 4 deletions

View File

@ -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);

View File

@ -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);