Skip to content

Commit

Permalink
Fix null error with code-created input actions
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurkehrwald committed Sep 20, 2024
1 parent 3e5782d commit c1ee755
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion VisualPinball.Unity/VisualPinball.Unity/Game/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ public void RemoveHardwareRule(string switchId, string coilId)

private static void HandleInput(object obj, InputActionChange change)
{
if (obj is InputAction action && action.actionMap.name == InputConstants.MapDebug) {
if (obj is InputAction action && action.actionMap != null && action.actionMap.name == InputConstants.MapDebug) {
var value = action.ReadValue<float>();
switch (action.name) {
case InputConstants.ActionSlowMotion: {
Expand Down

0 comments on commit c1ee755

Please sign in to comment.