From 1fd1cf3dfb396743f0ad4c30fed45ab46e8b708b Mon Sep 17 00:00:00 2001 From: Tim Crawford Date: Tue, 4 Feb 2020 13:37:10 -0700 Subject: [PATCH] UefiPayloadPkg: Clear screen on boot error --- .../Library/PlatformBootManagerLib/PlatformBootManager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c index eecc781808..228aa4a14b 100644 --- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c +++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c @@ -334,7 +334,8 @@ PlatformBootManagerUnableToBoot ( // AsciiPrint() will NULL-check gST->ConOut internally. We check gST->ConIn // here to see if it makes sense to request and wait for a keypress. // - if (gST->ConIn != NULL) { + if (gST->ConOut != NULL && gST->ConIn != NULL) { + gST->ConOut->ClearScreen (gST->ConOut); AsciiPrint ( "%a: No bootable option or device was found.\n" "%a: Press any key to enter the Boot Manager Menu.\n",