From e458f432b6d7a462ba34c8e3efd3834445aa2990 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 892fe82a14..e7c45f8d0a 100644 --- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c +++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c @@ -266,7 +266,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",