From 114a75ad8694046372d4892d0d5e59b4088b2885 Mon Sep 17 00:00:00 2001 From: Liming Gao Date: Sat, 10 Nov 2018 22:06:39 +0800 Subject: [PATCH] Revert "MdeModulePkg/DisplayEngine: Remove useless NULL ptr check for NewPos" This reverts commit 8cd4e734ccdfbc961c72aeaa8dbd3f5154171f9b. It is not a real bug fix. It should not be pushed after Hard Feature Freeze for edk2-stable201811 tag. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Cc: Dandan Bi Reviewed-by: Bi Dandan --- MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c index 44f087fe01..7390f954b6 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c @@ -2882,7 +2882,6 @@ UiDisplayMenu ( // ControlFlag = CfUpdateHelpString; - ASSERT (NewPos != NULL); UpdateHighlightMenuInfo(NewPos, TopOfScreen, SkipValue); if (SkipHighLight) { @@ -2911,7 +2910,7 @@ UiDisplayMenu ( Temp2 = 0; } - if (MenuOption == NULL || NewPos != &MenuOption->Link) { + if (NewPos != NULL && (MenuOption == NULL || NewPos != &MenuOption->Link)) { if (MenuOption != NULL) { // // Remove the old highlight menu.