]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Revert "MdeModulePkg/DisplayEngine: Remove useless NULL ptr check for NewPos"
authorLiming Gao <liming.gao@intel.com>
Sat, 10 Nov 2018 14:06:39 +0000 (22:06 +0800)
committerLiming Gao <liming.gao@intel.com>
Sun, 11 Nov 2018 03:42:36 +0000 (11:42 +0800)
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 <liming.gao@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Bi Dandan <dandan.bi@intel.com>
MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c

index 44f087fe01aa4bf05d79745b8d949785b0a66753..7390f954b67f1ec13d41b3dea404964096356563 100644 (file)
@@ -2882,7 +2882,6 @@ UiDisplayMenu (
       //\r
       ControlFlag = CfUpdateHelpString;\r
 \r
-      ASSERT (NewPos != NULL);\r
       UpdateHighlightMenuInfo(NewPos, TopOfScreen, SkipValue);\r
 \r
       if (SkipHighLight) {\r
@@ -2911,7 +2910,7 @@ UiDisplayMenu (
         Temp2 = 0;\r
       }\r
 \r
-      if (MenuOption == NULL || NewPos != &MenuOption->Link) {\r
+      if (NewPos != NULL && (MenuOption == NULL || NewPos != &MenuOption->Link)) {\r
         if (MenuOption != NULL) {\r
           //\r
           // Remove the old highlight menu.\r