diff options
author | Eric Dong <eric.dong@intel.com> | 2013-12-09 03:21:29 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-12-09 03:21:29 +0000 |
commit | 05de47ef04864cd9d55228b2065d7397387e54ac (patch) | |
tree | c14793867559523a9bac594b322f135365dfbb2a /MdeModulePkg | |
parent | 42f75495f3a89f30747406f7bf8fec9919da7b28 (diff) | |
download | edk2-platforms-05de47ef04864cd9d55228b2065d7397387e54ac.tar.xz |
Refine code to fix potential code bug.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14948 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c | 5 |
1 files changed, 3 insertions, 2 deletions
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;
|