mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-09-29 09:41:36 +02:00
video: console: Fix default font selection
Some callers expect to call this with NULL font name to select the default font (eg. boot/scene.c). Without handling the NULL condition U-Boot crashes instead of displaying a bootflow GUI menu. Signed-off-by: Ondrej Jirman <megi@xff.cz> Cc: Anatolij Gustschin <agust@denx.de>
This commit is contained in:
parent
8e21064cb3
commit
7a2fee8d29
@ -201,6 +201,12 @@ int console_simple_select_font(struct udevice *dev, const char *name, uint size)
|
||||
{
|
||||
struct video_fontdata *font;
|
||||
|
||||
if (!name) {
|
||||
if (fonts->name)
|
||||
console_set_font(dev, fonts);
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (font = fonts; font->name; font++) {
|
||||
if (!strcmp(name, font->name)) {
|
||||
console_set_font(dev, font);
|
||||
|
Loading…
x
Reference in New Issue
Block a user