]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
Refine the fix for the bug that cause assert when do the reconnect in the callback...
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Setup.c
index a8bbd582b5b6ccc4cc9be938dfbf0ea5037108c1..2b09593b9115b148bd0888272cf8989452ca5f5a 100644 (file)
@@ -2449,7 +2449,10 @@ ValidateFormSet (
   ASSERT (FormSet != NULL);\r
 \r
   Find = ValidateHiiHandle(FormSet->HiiHandle);\r
-  if (!Find) {\r
+  //\r
+  // Should not remove the formset which is being used.\r
+  //\r
+  if (!Find && (FormSet != gCurrentSelection->FormSet)) {\r
     CleanBrowserStorage(FormSet);\r
     RemoveEntryList (&FormSet->Link);\r
     DestroyFormSet (FormSet);\r