From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> If not main menu has been set when calling bt_shell_add_submenu then turns it on it main menu. --- src/shared/shell.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/shell.c b/src/shared/shell.c index 0d82bc282..7ba264b99 100644 --- a/src/shared/shell.c +++ b/src/shared/shell.c @@ -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(); -- 2.35.1