fix: check if system exists in HandleSystemCommandsTargeted

This commit is contained in:
spiral
2022-01-26 06:20:26 -05:00
parent af3702152f
commit efaf814e12
2 changed files with 38 additions and 24 deletions

View File

@@ -55,6 +55,13 @@ public static class ContextChecksExt
return ctx;
}
public static Context CheckSystem(this Context ctx, PKSystem system)
{
if (system == null)
throw Errors.NoSystemError;
return ctx;
}
public static Context CheckNoSystem(this Context ctx)
{
if (ctx.System != null)