From 602ffe47973cdd735b2d37005616b58fef2c9147 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Wed, 9 Aug 2023 10:23:16 +0200 Subject: [PATCH] Fix crash when setting device without command Closes #9 --- main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.c b/main.c index 9a7b1b7..92a7b60 100644 --- a/main.c +++ b/main.c @@ -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;