From: Liming Gao Date: Sat, 10 Nov 2018 14:06:39 +0000 (+0800) Subject: Revert "MdeModulePkg/DisplayEngine: Remove useless NULL ptr check for NewPos" X-Git-Tag: edk2-stable201903~624 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=114a75ad8694046372d4892d0d5e59b4088b2885 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 --- 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.