mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
42f75495f3
commit
05de47ef04
|
@ -2548,12 +2548,12 @@ UiDisplayMenu (
|
||||||
// If the screen has no menu items, and the user didn't select UiReset
|
// If the screen has no menu items, and the user didn't select UiReset
|
||||||
// ignore the selection and go back to reading keys.
|
// ignore the selection and go back to reading keys.
|
||||||
//
|
//
|
||||||
|
ASSERT(MenuOption != NULL);
|
||||||
if(IsListEmpty (&gMenuOption) || MenuOption->GrayOut || MenuOption->ReadOnly) {
|
if(IsListEmpty (&gMenuOption) || MenuOption->GrayOut || MenuOption->ReadOnly) {
|
||||||
ControlFlag = CfReadKey;
|
ControlFlag = CfReadKey;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT(MenuOption != NULL);
|
|
||||||
Statement = MenuOption->ThisTag;
|
Statement = MenuOption->ThisTag;
|
||||||
if ((Statement->OpCode->OpCode == EFI_IFR_DATE_OP)
|
if ((Statement->OpCode->OpCode == EFI_IFR_DATE_OP)
|
||||||
|| (Statement->OpCode->OpCode == EFI_IFR_TIME_OP)
|
|| (Statement->OpCode->OpCode == EFI_IFR_TIME_OP)
|
||||||
|
@ -2736,7 +2736,8 @@ UiDisplayMenu (
|
||||||
|
|
||||||
case CfUiHotKey:
|
case CfUiHotKey:
|
||||||
ControlFlag = CfRepaint;
|
ControlFlag = CfRepaint;
|
||||||
|
|
||||||
|
ASSERT (HotKey != NULL);
|
||||||
gUserInput->Action = HotKey->Action;
|
gUserInput->Action = HotKey->Action;
|
||||||
ControlFlag = CfExit;
|
ControlFlag = CfExit;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue