Skip to content

Commit

Permalink
[WzLib] fix WzImage WzBinaryReader not property closed when Dispose()
Browse files Browse the repository at this point in the history
  • Loading branch information
lastbattle committed Dec 20, 2022
1 parent bbc4da9 commit de41e02
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion MapleLib/WzLib/WzImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -117,6 +116,12 @@ public override void Dispose()
properties.Clear();
properties = null;
}
if (reader != null)
{
reader.Close();
reader.Dispose();
reader = null;
}
}
#endregion

Expand Down

0 comments on commit de41e02

Please sign in to comment.