From 7228815241b74b8a8f034a4cc9f80a11c0ee199b Mon Sep 17 00:00:00 2001 From: dtang2 Date: Tue, 7 Nov 2006 02:36:29 +0000 Subject: [PATCH] Bug fix for "Unplug U Disk during exploer using File Explorer cause tiano halt" git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1906 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Dxe/PlatformBds/Generic/BootMaint/FileExplorer.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/FileExplorer.c b/EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/FileExplorer.c index 5f304e0b8f..db835cf534 100644 --- a/EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/FileExplorer.c +++ b/EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/FileExplorer.c @@ -148,7 +148,8 @@ Returns: BM_FILE_CONTEXT *NewFileContext; FORM_ID FormId; BOOLEAN ExitFileExplorer; - + EFI_STATUS Status; + NewMenuEntry = NULL; NewFileContext = NULL; ExitFileExplorer = FALSE; @@ -180,7 +181,11 @@ Returns: if (NewFileContext->IsDir ) { RemoveEntryList (&NewMenuEntry->Link); BOpt_FreeMenu (&DirectoryMenu); - BOpt_FindFiles (CallbackData, NewMenuEntry); + Status = BOpt_FindFiles (CallbackData, NewMenuEntry); + if (EFI_ERROR (Status)) { + ExitFileExplorer = TRUE; + goto exit; + } CreateMenuStringToken (CallbackData, CallbackData->FeHiiHandle, &DirectoryMenu); BOpt_DestroyMenuEntry (NewMenuEntry); @@ -247,7 +252,7 @@ Returns: } } } - +exit: return ExitFileExplorer; } -- 2.39.2