]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
Refine code to make it more safely.
[mirror_edk2.git] / MdeModulePkg / Universal / HiiDatabaseDxe / Database.c
index 65334ded5ed30fafbfd30241edc71a47dd8e18eb..01d7f02234ad30700f8fc6412e7699285f6e3da9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Implementation for EFI_HII_DATABASE_PROTOCOL.\r
 \r
-Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
 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
@@ -2419,6 +2419,7 @@ AddPackages (
   //\r
   StringPkgIsAdd = FALSE;\r
   FontPackage = NULL;\r
+  StringPackage = NULL;\r
 \r
   //\r
   // Process the package list header\r
@@ -2505,6 +2506,7 @@ AddPackages (
       if (EFI_ERROR (Status)) {\r
         return Status;\r
       }\r
+      ASSERT (StringPackage != NULL);\r
       Status = InvokeRegisteredFunction (\r
                  Private,\r
                  NotifyType,\r