Revert "MdeModulePkg/DisplayEngine: Remove useless NULL ptr check for NewPos"

This reverts commit 8cd4e734cc.

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>
This commit is contained in:
Liming Gao 2018-11-10 22:06:39 +08:00
parent e9ab1635a2
commit 114a75ad86
1 changed files with 1 additions and 2 deletions

View File

@ -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.