MdeModulePkg/UiApp: Fix the incorrect use of the HiiHandle
authorDandan Bi <dandan.bi@intel.com>
Wed, 8 Jun 2016 08:46:55 +0000 (16:46 +0800)
committerStar Zeng <star.zeng@intel.com>
Tue, 14 Jun 2016 06:10:44 +0000 (14:10 +0800)
In current code, when adding string package, it will return
'gStringPackHandle'. But the code use the 'gHiiHandle' to get
string. It is incorrect. This patch is to fix this issue.

Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c

index dfb37ec9e1003d308124490df74c65c01ea5c510..dc5d1c6c409bd5ce0905fe6c3f1fdb7f54389b09 100644 (file)
@@ -55,7 +55,7 @@ typedef struct {
 CHAR8                        *gLanguageString;\r
 EFI_STRING_ID                *gLanguageToken;\r
 UI_HII_DRIVER_INSTANCE       *gHiiDriverList;\r
-EFI_HII_HANDLE               gHiiHandle;\r
+extern EFI_HII_HANDLE        gStringPackHandle;\r
 \r
 \r
 /**\r
@@ -589,7 +589,7 @@ UiListThirdPartyDrivers (
 \r
     String = HiiGetString (HiiHandles[Index], Token, NULL);\r
     if (String == NULL) {\r
-      String = HiiGetString (gHiiHandle, STRING_TOKEN (STR_MISSING_STRING), NULL);\r
+      String = HiiGetString (gStringPackHandle, STRING_TOKEN (STR_MISSING_STRING), NULL);\r
       ASSERT (String != NULL);\r
     } else if (SpecialHandlerFn != NULL) {\r
       //\r
@@ -607,7 +607,7 @@ UiListThirdPartyDrivers (
 \r
     String = HiiGetString (HiiHandles[Index], TokenHelp, NULL);\r
     if (String == NULL) {\r
-      String = HiiGetString (gHiiHandle, STRING_TOKEN (STR_MISSING_STRING), NULL);\r
+      String = HiiGetString (gStringPackHandle, STRING_TOKEN (STR_MISSING_STRING), NULL);\r
       ASSERT (String != NULL);\r
     }\r
     DriverListPtr[Count].HelpId = HiiSetString (HiiHandle, 0, String, NULL);\r