From d1ac47ad03fe37e79c92a2f7951fbddb410f51e8 Mon Sep 17 00:00:00 2001 From: morkt Date: Sat, 20 Jun 2015 21:30:21 +0400 Subject: [PATCH] (Dispose): dispose of members only when 'disposing' argument is true. --- ArcFormats/ArcCommon.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ArcFormats/ArcCommon.cs b/ArcFormats/ArcCommon.cs index c215eae6..e15c743c 100644 --- a/ArcFormats/ArcCommon.cs +++ b/ArcFormats/ArcCommon.cs @@ -180,7 +180,8 @@ namespace GameRes.Formats { if (!disposed) { - m_stream.Dispose(); + if (disposing) + m_stream.Dispose(); disposed = true; base.Dispose (disposing); } @@ -278,7 +279,7 @@ namespace GameRes.Formats { if (!m_disposed) { - if (m_should_dispose) + if (m_should_dispose && disposing) m_stream.Dispose(); m_disposed = true; base.Dispose (disposing);