diff --git a/MapleLib/WzLib/WzImage.cs b/MapleLib/WzLib/WzImage.cs index bf02f01c..f3e7749b 100644 --- a/MapleLib/WzLib/WzImage.cs +++ b/MapleLib/WzLib/WzImage.cs @@ -107,7 +107,6 @@ internal WzImage(string name, WzBinaryReader reader, int checksum) public override void Dispose() { name = null; - reader = null; if (properties != null) { foreach (WzImageProperty prop in properties) @@ -117,6 +116,12 @@ public override void Dispose() properties.Clear(); properties = null; } + if (reader != null) + { + reader.Close(); + reader.Dispose(); + reader = null; + } } #endregion