summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Library/GenericBdsLib/BdsMisc.c')
-rw-r--r--MdeModulePkg/Library/GenericBdsLib/BdsMisc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c b/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c
index b9e6ae7ef3..acf61ebcb6 100644
--- a/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c
+++ b/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c
@@ -1170,7 +1170,7 @@ BdsSetMemoryTypeInformationVariable (
&gEfiMemoryTypeInformationGuid,
(VOID **) &CurrentMemoryTypeInformation
);
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) || CurrentMemoryTypeInformation == NULL) {
return;
}