Skip to content

Commit

Permalink
Fix crash when setting device without command
Browse files Browse the repository at this point in the history
Closes nowrep#9
  • Loading branch information
nowrep committed Aug 9, 2023
1 parent ea5e266 commit 602ffe4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,11 @@ int main(int argc, char *argv[])
argv += 2;
}

if (argc < 2) {
print_help();
return 1;
}

struct dualsense ds;
if (!dualsense_init(&ds, dev_serial)) {
return 1;
Expand Down

0 comments on commit 602ffe4

Please sign in to comment.