From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4587E21959CB2 for ; Sat, 10 Nov 2018 06:15:56 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Nov 2018 06:15:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,487,1534834800"; d="scan'208";a="278735824" Received: from lgao4-mobl1.ccr.corp.intel.com ([10.249.169.254]) by fmsmga005.fm.intel.com with ESMTP; 10 Nov 2018 06:15:54 -0800 From: Liming Gao To: edk2-devel@lists.01.org Cc: Dandan Bi Date: Sat, 10 Nov 2018 22:15:45 +0800 Message-Id: <20181110141545.11944-1-liming.gao@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 Subject: [Patch] Revert "MdeModulePkg/DisplayEngine: Remove useless NULL ptr check for NewPos" X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Nov 2018 14:15:56 -0000 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 --- 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. -- 2.13.0.windows.1