Skip to content

Commit

Permalink
fix: crash when clicking on empty controller list
Browse files Browse the repository at this point in the history
  • Loading branch information
WyvernIXTL committed Nov 3, 2024
1 parent a7808f2 commit bc94d78
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gamepadla_plus/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,10 @@ def update_result_table(data: dict):
update_joysticks()

elif event == "-GAMEPAD-LIST-":
clicked_string = values["-GAMEPAD-LIST-"][0]
if clicked_string != "":
selected_joystick = int(clicked_string.split(".")[0])
if len(values["-GAMEPAD-LIST-"]) > 0:
clicked_string = values["-GAMEPAD-LIST-"][0]
if clicked_string != "":
selected_joystick = int(clicked_string.split(".")[0])

elif event == "-START-TEST-BUTTON-":
if len(joysticks) == 0:
Expand Down

0 comments on commit bc94d78

Please sign in to comment.