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:
co-authored by
PhyxionNL
copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
parent
e54bc56bef
commit
95efd9fbbc
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user