From 90d2473f5256425146a8c10f539b7737aa37fd23 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Wed, 29 Jun 2022 23:41:53 +0300 Subject: [PATCH] Fix macOS crash --- src/Main.gd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Main.gd b/src/Main.gd index 98be1eb03..65ba4a530 100644 --- a/src/Main.gd +++ b/src/Main.gd @@ -364,7 +364,10 @@ func _use_osx_shortcuts() -> void: var inputmap := InputMap for action in inputmap.get_actions(): - var event: InputEvent = inputmap.get_action_list(action)[0] + var action_list: Array = inputmap.get_action_list(action) + if action_list.size() == 0: + continue + var event: InputEvent = action_list[0] if event.is_action("show_pixel_grid"): event.shift = true