mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-15 16:24:28 +08:00
shell: Make bt_shell_add_submenu set main menu if none has been set
If not main menu has been set when calling bt_shell_add_submenu then turns it on it main menu.
This commit is contained in:
parent
6cb6e2ddf4
commit
0cc480a546
@ -1248,6 +1248,9 @@ bool bt_shell_add_submenu(const struct bt_shell_menu *menu)
|
||||
if (!menu)
|
||||
return false;
|
||||
|
||||
if (!data.main)
|
||||
return bt_shell_set_menu(menu);
|
||||
|
||||
if (!data.submenus)
|
||||
data.submenus = queue_new();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user