Skip to content

Commit a8bb3c9

Browse files
committed
Undo bandaid to prevent a crash which shouldn't be occuring
1 parent 750d85e commit a8bb3c9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

action_plugins/remap/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ def _populate_ui(self):
123123
if self.action_data.parent.tag == "hat_buttons":
124124
input_type = InputType.JoystickButton
125125

126+
# Handle obscure bug which causes the action_data to contain no
127+
# input_type information
128+
if input_type is None:
129+
input_type = InputType.JoystickButton
130+
logging.getLogger("system").warning("None as input type encountered")
131+
126132
# If no valid input item is selected get the next unused one
127133
if self.action_data.vjoy_input_id in [0, None]:
128134
free_inputs = self._get_profile_root().list_unused_vjoy_inputs()

0 commit comments

Comments
 (0)