summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c10
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Setup.c7
2 files changed, 14 insertions, 3 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c b/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
index 86046081fe..6f153d0c3f 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
@@ -359,12 +359,18 @@ CallDeviceManager (
}
String = HiiGetString (HiiHandles[Index], FormSetTitle, NULL);
- ASSERT (String != NULL);
+ if (String == NULL) {
+ String = HiiGetString (HiiHandle, STR_MISSING_STRING, NULL);
+ ASSERT (String != NULL);
+ }
Token = HiiSetString (HiiHandle, 0, String, NULL);
FreePool (String);
String = HiiGetString (HiiHandles[Index], FormSetHelp, NULL);
- ASSERT (String != NULL);
+ if (String == NULL) {
+ String = HiiGetString (HiiHandle, STR_MISSING_STRING, NULL);
+ ASSERT (String != NULL);
+ }
TokenHelp = HiiSetString (HiiHandle, 0, String, NULL);
FreePool (String);
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
index 0a067f0376..15d4af3cf1 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
@@ -76,6 +76,8 @@ CHAR16 *gAdjustNumber;
CHAR16 *gSaveChanges;
CHAR16 *gOptionMismatch;
+CHAR16 *mUnknownString = L"!";
+
CHAR16 gPromptBlockWidth;
CHAR16 gOptionBlockWidth;
CHAR16 gHelpBlockWidth;
@@ -650,7 +652,10 @@ GetToken (
EFI_STRING String;
String = HiiGetString (HiiHandle, Token, NULL);
- ASSERT (String != NULL);
+ if (String == NULL) {
+ String = AllocateCopyPool (sizeof (mUnknownString), mUnknownString);
+ ASSERT (String != NULL);
+ }
return (CHAR16 *) String;
}