public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] Revert "MdeModulePkg/DisplayEngine: Remove useless NULL ptr check for NewPos"
@ 2018-11-10 14:15 Liming Gao
  2018-11-10 23:32 ` Bi, Dandan
  0 siblings, 1 reply; 2+ messages in thread
From: Liming Gao @ 2018-11-10 14:15 UTC (permalink / raw)
  To: edk2-devel; +Cc: Dandan Bi

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Patch] Revert "MdeModulePkg/DisplayEngine: Remove useless NULL ptr check for NewPos"
  2018-11-10 14:15 [Patch] Revert "MdeModulePkg/DisplayEngine: Remove useless NULL ptr check for NewPos" Liming Gao
@ 2018-11-10 23:32 ` Bi, Dandan
  0 siblings, 0 replies; 2+ messages in thread
From: Bi, Dandan @ 2018-11-10 23:32 UTC (permalink / raw)
  To: Gao, Liming, edk2-devel@lists.01.org


Reviewed-by: Bi Dandan <dandan.bi@intel.com>

Thanks,
Dandan

> -----Original Message-----
> From: Gao, Liming
> Sent: Saturday, November 10, 2018 10:16 PM
> To: edk2-devel@lists.01.org
> Cc: Bi, Dandan <dandan.bi@intel.com>
> 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 <liming.gao@intel.com>
> Cc: Dandan Bi <dandan.bi@intel.com>
> ---
>  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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-10 23:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-10 14:15 [Patch] Revert "MdeModulePkg/DisplayEngine: Remove useless NULL ptr check for NewPos" Liming Gao
2018-11-10 23:32 ` Bi, Dandan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox