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:
Emil Gydesen 2022-10-05 14:46:13 +02:00 committed by Carles Cufí
commit ea448ed69a

View file

@ -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) {