summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
Diffstat (limited to 'hcid')
-rw-r--r--hcid/passkey-agent.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hcid/passkey-agent.c b/hcid/passkey-agent.c
index 7995bafe..b46ba96b 100644
--- a/hcid/passkey-agent.c
+++ b/hcid/passkey-agent.c
@@ -305,6 +305,11 @@ int main(int argc, char **argv)
passkey = strdup(argv[0]);
address = (argc > 1) ? strdup(argv[1]) : NULL;
+ if (!use_default && !address) {
+ usage();
+ exit(1);
+ }
+
if (!agent_path)
agent_path = strdup(default_path);