]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
Sync in bug fix from EDK I:
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Ui.c
index 2869c587c52e5f3966416140e1cbdd09e79f1f28..fc715fea5b65567a543ec1904b08c32a96554b1c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Utility functions for User Interface functions.\r
 \r
-Copyright (c) 2004 - 2007, Intel Corporation\r
+Copyright (c) 2004 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -116,6 +116,8 @@ SCREEN_OPERATION_T0_CONTROL_FLAG  gScreenOperationToControlFlag[] = {
   }\r
 };\r
 \r
+BOOLEAN  mInputError;\r
+\r
 \r
 /**\r
   Set Buffer to Value for Size bytes.\r
@@ -892,7 +894,6 @@ UpdateStatusBar (
   )\r
 {\r
   UINTN           Index;\r
-  STATIC BOOLEAN  InputError;\r
   CHAR16          *NvUpdateMessage;\r
   CHAR16          *InputErrorMessage;\r
 \r
@@ -908,14 +909,14 @@ UpdateStatusBar (
         gScreenDimensions.BottomRow - 1,\r
         InputErrorMessage\r
         );\r
-      InputError = TRUE;\r
+      mInputError = TRUE;\r
     } else {\r
       gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT_HIGHLIGHT);\r
       for (Index = 0; Index < (GetStringWidth (InputErrorMessage) - 2) / 2; Index++) {\r
         PrintAt (gScreenDimensions.LeftColumn + gPromptBlockWidth + Index, gScreenDimensions.BottomRow - 1, L"  ");\r
       }\r
 \r
-      InputError = FALSE;\r
+      mInputError = FALSE;\r
     }\r
     break;\r
 \r
@@ -947,7 +948,7 @@ UpdateStatusBar (
     break;\r
 \r
   case REFRESH_STATUS_BAR:\r
-    if (InputError) {\r
+    if (mInputError) {\r
       UpdateStatusBar (INPUT_ERROR, Flags, TRUE);\r
     }\r
 \r
@@ -1019,7 +1020,7 @@ GetWidth (
 }\r
 \r
 \r
-STATIC BOOLEAN GetLineByWidthFinished = FALSE;\r
+BOOLEAN GetLineByWidthFinished = FALSE;\r
 \r
 /**\r
   Will copy LineWidth amount of a string in the OutputString buffer and return the\r
@@ -2137,7 +2138,9 @@ UiDisplayMenu (
             gDirection = SCAN_LEFT;\r
           }\r
           Status = ProcessOptions (Selection, MenuOption, TRUE, &OptionString);\r
-          SafeFreePool (OptionString);\r
+          if (OptionString != NULL) {\r
+            FreePool (OptionString);\r
+          }\r
         }\r
         break;\r
 \r