From 967e323a1d81b9672f8672e8d6f78bc62aec7c81 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Wed, 19 Dec 2018 18:16:22 +0000 Subject: [PATCH] Merged PR 606: Null pointer fix in BootGraphicsLib and a debug print fix Null pointer fix in BootGraphicsLib and a debug print fix --- MsCorePkg/Library/PlatformBootManagerLib/BdsPlatform.c | 2 +- MsGraphicsPkg/Library/BootGraphicsLib/BootGraphicsLib.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/MsCorePkg/Library/PlatformBootManagerLib/BdsPlatform.c b/MsCorePkg/Library/PlatformBootManagerLib/BdsPlatform.c index 1a8a1e135e..6385ee0849 100644 --- a/MsCorePkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/MsCorePkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -382,7 +382,7 @@ PlatformBootManagerAfterConsole ( // // Boot Mode obtained in BeforeConsole action. // - DEBUG((DEBUG_INFO,"BootMode -%x\n", mBootMode)); + DEBUG((DEBUG_INFO,"BootMode 0x%x\n", mBootMode)); // // Go the different platform policy with different boot mode diff --git a/MsGraphicsPkg/Library/BootGraphicsLib/BootGraphicsLib.c b/MsGraphicsPkg/Library/BootGraphicsLib/BootGraphicsLib.c index e1bb92b79b..1b46338404 100644 --- a/MsGraphicsPkg/Library/BootGraphicsLib/BootGraphicsLib.c +++ b/MsGraphicsPkg/Library/BootGraphicsLib/BootGraphicsLib.c @@ -100,7 +100,11 @@ DisplayBootGraphic( // // Erase Cursor from screen // - gST->ConOut->EnableCursor (gST->ConOut, FALSE); + if (gST->ConOut != NULL) { + gST->ConOut->EnableCursor (gST->ConOut, FALSE); + } else { + DEBUG((DEBUG_WARN, "%a - ConOut is NULL, will not disable cursor\n", __FUNCTION__)); + } SizeOfX = GraphicsOutput->Mode->Info->HorizontalResolution; SizeOfY = GraphicsOutput->Mode->Info->VerticalResolution;