mirror of
https://github.com/crskycode/GARbro.git
synced 2026-06-10 23:59:13 +08:00
fixed Dispose pattern.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user