mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +08:00
fixed Dispose pattern.
This commit is contained in:
parent
8d5e1d602a
commit
526e813f74
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user