From ee095957f0d5704fd8fdf5f7ab87540e5243dd56 Mon Sep 17 00:00:00 2001 From: bbbradsmith Date: Fri, 11 Oct 2024 07:00:24 -0400 Subject: [PATCH] Fix image loaded as palette not releasing file handle. --- BinxelviewForm.cs | 2 ++ readme.txt | 1 + 2 files changed, 3 insertions(+) diff --git a/BinxelviewForm.cs b/BinxelviewForm.cs index 5449fdd..3440518 100644 --- a/BinxelviewForm.cs +++ b/BinxelviewForm.cs @@ -1074,6 +1074,7 @@ bool loadPalette(string path, bool image, bool sixbit_vga) if (cols.Length < 1) { palette_error = "Image does not contain a palette."; + img.Dispose(); return false; } @@ -1083,6 +1084,7 @@ bool loadPalette(string path, bool image, bool sixbit_vga) Color c = cols[i]; setPalette(i, c.R, c.G, c.B); } + img.Dispose(); return true; } diff --git a/readme.txt b/readme.txt index 49781c9..91c569b 100644 --- a/readme.txt +++ b/readme.txt @@ -240,6 +240,7 @@ Changes - Indicate hexadecimal position with bold font. - Command line arguments for options. - Default palette ability. +- Fix image loaded as palette not releasing file handle. 1.5.0.0 (2020-07-31) - Twiddle option for inspecting textures stored with morton ordering of pixels.