From: xdu2 Date: Mon, 26 Oct 2009 06:47:50 +0000 (+0000) Subject: Fix a UI hang bug when adding Boot Option or Driver Option. X-Git-Tag: edk2-stable201903~16952 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=9ecbc6547b2189cf297c0fa91318591fa1eed75a Fix a UI hang bug when adding Boot Option or Driver Option. Reproduce steps: 1. plug a NIC card to system 2. boot and select "Boot Maintenance Manager"->"Driver Options"->"Add Driver Option", a "MAC" device path will show up 3. select "MAC" device path and press Enter, and then press ESC 4. select "MAC" device path again, then the UI will hang. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9367 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c index 2eaf9b2d59..98dc54c939 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c @@ -139,9 +139,9 @@ UpdateFileExplorer ( CallbackData->FeDisplayContext = FileExplorerDisplayDirectory; - NewFileContext = (BM_FILE_CONTEXT *) NewMenuEntry->VariableContext; - if (NewFileContext->IsDir ) { + NewFileContext = (BM_FILE_CONTEXT *) NewMenuEntry->VariableContext; + RemoveEntryList (&NewMenuEntry->Link); BOpt_FreeMenu (&DirectoryMenu); Status = BOpt_FindFiles (CallbackData, NewMenuEntry);