summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2015-07-26 08:03:44 +0000
committerjljusten <jljusten@Edk2>2015-07-26 08:03:44 +0000
commitb2f35637da091be37748203a5817a1c732c69e12 (patch)
treeadf379a830e09a36fc5f1aa9c6d57e9d92a7483f
parent588fde6c15f60d44248bf42dd1ad545b7c2cbf4f (diff)
downloadedk2-platforms-b2f35637da091be37748203a5817a1c732c69e12.tar.xz
MdeModulePkg: Check the case caused by mismatch
When mismatch happens,there exists one case that exit current form and display last form.Assert code don't cover this case. Now add check to handle this situation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18053 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
index ae3038b6cb..9612f7665e 100644
--- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
+++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
@@ -1782,14 +1782,15 @@ FindTopMenu (
TopRow = gStatementDimensions.TopRow + SCROLL_ARROW_HEIGHT;
BottomRow = gStatementDimensions.BottomRow - SCROLL_ARROW_HEIGHT;
-
- if (gMisMatch) {
+ //
+ // When option mismatch happens,there exist two cases,one is reenter the form, just like the if case below,
+ // and the other is exit current form and enter last form, it can be covered by the else case.
+ //
+ if (gMisMatch && gFormData->HiiHandle == gHighligthMenuInfo.HiiHandle && gFormData->FormId == gHighligthMenuInfo.FormId) {
//
// Reenter caused by option mismatch or auto exit caused by refresh form(refresh interval/guid),
// base on the record highlight info to find the highlight menu.
//
- ASSERT (gFormData->HiiHandle == gHighligthMenuInfo.HiiHandle &&
- gFormData->FormId == gHighligthMenuInfo.FormId);
*HighlightMenu = FindHighLightMenuOption(NULL);
if (*HighlightMenu != NULL) {
@@ -1840,7 +1841,6 @@ FindTopMenu (
*SkipValue = 0;
}
- gMisMatch = FALSE;
} else if (FormData->HighLightedStatement != NULL) {
if (IsSavedHighlightStatement (FormData->HighLightedStatement)) {
//
@@ -1914,6 +1914,8 @@ FindTopMenu (
*SkipValue = 0;
}
+ gMisMatch = FALSE;
+
//
// First enter to show the menu, update highlight info.
//