summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrString.c
diff options
context:
space:
mode:
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrString.c')
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrString.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrString.c b/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrString.c
index 3fe278aaf0..01bad65001 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrString.c
+++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrString.c
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -551,6 +551,9 @@ IfrLibNewString (
LocateHiiProtocols ();
Languages = GetSupportedLanguages (PackageList);
+ if (Languages == NULL) {
+ return EFI_NOT_FOUND;
+ }
LangStrings = Languages;
while (*LangStrings != 0) {
@@ -677,6 +680,9 @@ IfrLibSetString (
LocateHiiProtocols ();
Languages = GetSupportedLanguages (PackageList);
+ if (Languages == NULL) {
+ return EFI_NOT_FOUND;
+ }
LangStrings = Languages;
while (*LangStrings != 0) {