summaryrefslogtreecommitdiffstats
path: root/FatPkg/EnhancedFatDxe
diff options
context:
space:
mode:
Diffstat (limited to 'FatPkg/EnhancedFatDxe')
-rw-r--r--FatPkg/EnhancedFatDxe/DirectoryManage.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/FatPkg/EnhancedFatDxe/DirectoryManage.c b/FatPkg/EnhancedFatDxe/DirectoryManage.c
index 2e1e0039a1..cae6718734 100644
--- a/FatPkg/EnhancedFatDxe/DirectoryManage.c
+++ b/FatPkg/EnhancedFatDxe/DirectoryManage.c
@@ -1185,6 +1185,7 @@ Returns:
FAT_ODIR *ODir;
EFI_STATUS Status;
+ ASSERT (OFile != NULL);
ODir = OFile->ODir;
ASSERT (ODir != NULL);
DirEnt = AllocateZeroPool (sizeof (FAT_DIRENT));
@@ -1376,8 +1377,8 @@ Returns:
FAT_VOLUME *Volume;
OFile = DirEnt->OFile;
- Volume = OFile->Volume;
ASSERT (OFile != NULL);
+ Volume = OFile->Volume;
if (OFile->ODir != NULL) {
FatDiscardODir (OFile);