From: Eric Dong Date: Mon, 9 Dec 2013 03:21:29 +0000 (+0000) Subject: Refine code to fix potential code bug. X-Git-Tag: edk2-stable201903~12009 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=05de47ef04864cd9d55228b2065d7397387e54ac Refine code to fix potential code bug. Signed-off-by: Eric Dong Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14948 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c index dbc5685b0e..4d98fc52a9 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c @@ -2548,12 +2548,12 @@ UiDisplayMenu ( // If the screen has no menu items, and the user didn't select UiReset // ignore the selection and go back to reading keys. // + ASSERT(MenuOption != NULL); if(IsListEmpty (&gMenuOption) || MenuOption->GrayOut || MenuOption->ReadOnly) { ControlFlag = CfReadKey; break; } - ASSERT(MenuOption != NULL); Statement = MenuOption->ThisTag; if ((Statement->OpCode->OpCode == EFI_IFR_DATE_OP) || (Statement->OpCode->OpCode == EFI_IFR_TIME_OP) @@ -2736,7 +2736,8 @@ UiDisplayMenu ( case CfUiHotKey: ControlFlag = CfRepaint; - + + ASSERT (HotKey != NULL); gUserInput->Action = HotKey->Action; ControlFlag = CfExit; break;