Skip to content

Commit

Permalink
Make MRubyContext.CommandPreset as nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
hadashiA committed Oct 14, 2024
1 parent d5c2dfe commit 17edd1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public Router Router

public ICommandPublisher Publisher => Router;

public MRubyCommandPreset CommandPreset { get; set; } = default!;
public MRubyCommandPreset? CommandPreset { get; set; }

public override bool IsInvalid => handle == IntPtr.Zero;
Router? router;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ internal static unsafe void OnCommandCalled(int scriptId, MrbNString commandName
{
return;
}
_ = script.Context.CommandPreset.CommandCallFromMrubyAsync(script, fixedCommandName, payload);
_ = script.Context.CommandPreset?.CommandCallFromMrubyAsync(script, fixedCommandName, payload);
}
catch (Exception ex)
{
Expand Down

0 comments on commit 17edd1f

Please sign in to comment.