ui/ncurses: Allow booting custom boot options
[petitboot] / ui / common / discover-client.c
index 90cd3b419101c051e35f5da1539eb975673c22ee..fea8c573c7d18516657dca663c94525164a1ccda 100644 (file)
@@ -264,8 +264,7 @@ static void create_boot_command(struct boot_command *command,
                const struct boot_option *boot_option,
                const struct pb_boot_data *data)
 {
-
-       command->option_id = boot_option->id;
+       command->option_id = boot_option ? boot_option->id : NULL;
        command->boot_image_file = data->image;
        command->initrd_file = data->initrd;
        command->dtb_file = data->dtb;