Refine code to avoid potential access violation.

Signed-off-by:ydong10
Reviewed-by:lgao4








git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11976 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ydong10 2011-07-05 08:24:22 +00:00
parent d88ca2c90d
commit 715cf6dd7e
2 changed files with 2 additions and 2 deletions

View File

@ -1168,7 +1168,7 @@ ProcessCallBackFunction (
// "retrieve" should update to the question's temp buffer.
//
if (Action == EFI_BROWSER_ACTION_CHANGING || Action == EFI_BROWSER_ACTION_RETRIEVE) {
SetQuestionValue(Selection->FormSet,Selection->Form, Question,TRUE);
SetQuestionValue(Selection->FormSet, Selection->Form, Statement, TRUE);
}
} else if (Status == EFI_UNSUPPORTED) {
//

View File

@ -2877,6 +2877,7 @@ UiDisplayMenu (
AdjustDateAndTimePosition (TRUE, &NewPos);
if (NewPos->BackLink != &gMenuOption) {
MenuOption = MENU_OPTION_FROM_LINK (NewPos);
ASSERT (MenuOption != NULL);
NewLine = TRUE;
NewPos = NewPos->BackLink;
@ -2888,7 +2889,6 @@ UiDisplayMenu (
}
NextMenuOption = MENU_OPTION_FROM_LINK (NewPos);
ASSERT (MenuOption != NULL);
if (Difference < 0) {
//
// We hit the begining MenuOption that can be focused