Refine the fix for the bug that cause assert when do the reconnect in the callback function.

Contributed-under: TianoCore Contribution Agreement 1.0
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@15914 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Eric Dong
2014-08-27 03:29:01 +00:00
committed by ydong10
parent d1984abcb9
commit 275ea01efd
2 changed files with 4 additions and 29 deletions

View File

@ -2449,7 +2449,10 @@ ValidateFormSet (
ASSERT (FormSet != NULL);
Find = ValidateHiiHandle(FormSet->HiiHandle);
if (!Find) {
//
// Should not remove the formset which is being used.
//
if (!Find && (FormSet != gCurrentSelection->FormSet)) {
CleanBrowserStorage(FormSet);
RemoveEntryList (&FormSet->Link);
DestroyFormSet (FormSet);