summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/HiiDatabaseDxe/Font.c')
-rw-r--r--MdeModulePkg/Universal/HiiDatabaseDxe/Font.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c
index 06b09e7f76..82f47163b7 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c
@@ -1566,6 +1566,7 @@ HiiStringToImage (
Status = EFI_SUCCESS;
StringIn2 = NULL;
SystemDefault = NULL;
+ StringIn = NULL;
//
// Calculate the string output information, including specified color and font .
@@ -1596,11 +1597,13 @@ HiiStringToImage (
Foreground = ((EFI_FONT_DISPLAY_INFO *) StringInfo)->ForegroundColor;
Background = ((EFI_FONT_DISPLAY_INFO *) StringInfo)->BackgroundColor;
- } else {
+ } else if (Status == EFI_SUCCESS) {
FontInfo = &StringInfoOut->FontInfo;
Height = StringInfoOut->FontInfo.FontSize;
Foreground = StringInfoOut->ForegroundColor;
Background = StringInfoOut->BackgroundColor;
+ } else {
+ goto Exit;
}
}
@@ -1609,7 +1612,6 @@ HiiStringToImage (
//
StringPtr = String;
- StringIn = NULL;
//
// Ignore line-break characters only. Hyphens or dash character will be displayed