Bluetooth: Audio: add check for default_conn for audio qos
shell command
Add a missing NULL check for the command. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
ff7f644aff
commit
ea448ed69a
1 changed files with 5 additions and 0 deletions
|
@ -1015,6 +1015,11 @@ static int cmd_qos(const struct shell *sh, size_t argc, char *argv[])
|
|||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
if (default_conn == NULL) {
|
||||
shell_error(sh, "Not connected");
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
named_preset = default_preset;
|
||||
|
||||
if (argc > 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue