Fix null reference exception in UnpackV1.Unpack.Dispose()

Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-11-19 15:16:18 +00:00
parent 72cf77b7c7
commit 31f81f38af

View File

@@ -27,7 +27,7 @@ internal sealed partial class Unpack : BitInput, IRarUnpack
if (!disposed)
{
base.Dispose();
if (!externalWindow)
if (!externalWindow && window is not null)
{
ArrayPool<byte>.Shared.Return(window);
window = null;