Add IsLoaded check to PawnIo.Close() method to prevent closing invalid handles (#1916)

* Initial plan

* Add IsLoaded check to PawnIo.Close() method to prevent closing invalid handles

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
This commit is contained in:
Copilot
2025-09-29 22:16:44 +02:00
committed by GitHub
co-authored by PhyxionNL copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
parent e54bc56bef
commit 95efd9fbbc
+5 -1
View File
@@ -68,7 +68,11 @@ public class PawnIo
return new PawnIo(null);
}
public void Close() => _handle.Close();
public void Close()
{
if (IsLoaded)
_handle.Close();
}
public long[] Execute(string name, long[] input, int outLength)
{