From 32ffef6ba3209d19466d8ef745d83d2c91c4535d Mon Sep 17 00:00:00 2001 From: Stephan Gerhold Date: Sat, 23 Sep 2023 14:28:00 +0200 Subject: [PATCH] lk2nd: device: menu: Check if FB is actually initialized There is no fbcon_config if the display failed to initialize or if the device is running without display (e.g. on DragonBoard 410c). Add a check in display_fastboot_menu() that avoids crashing if that is the case. --- lk2nd/device/menu/menu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lk2nd/device/menu/menu.c b/lk2nd/device/menu/menu.c index af40f6d14..10ac04a6b 100644 --- a/lk2nd/device/menu/menu.c +++ b/lk2nd/device/menu/menu.c @@ -140,6 +140,9 @@ void display_fastboot_menu(void) int y, y_menu, old_scale, incr; unsigned int sel = 0, i; + if (!fb) + return; + /* * Make sure the specified line lenght fits on the screen. */