]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix the issue that ASSERT() at line 1391 incorrectly asserts when order list variable...
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 3 Jun 2010 08:49:46 +0000 (08:49 +0000)
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 3 Jun 2010 08:49:46 +0000 (08:49 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10564 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c

index 1ca93fd8866a28c77737ee58d6291c9933daf808..2cfc3b817ae61feb4a6746d4273e1f021046cdc8 100644 (file)
@@ -1380,6 +1380,7 @@ BOpt_GetOptionNumber (
   OrderListSize = 0;\r
   OrderList     = NULL;\r
   OptionNumber  = 0;\r
+  Index         = 0;\r
 \r
   UnicodeSPrint (StrTemp, sizeof (StrTemp), L"%sOrder", Type);\r
 \r
@@ -1388,12 +1389,13 @@ BOpt_GetOptionNumber (
                           &gEfiGlobalVariableGuid,\r
                           &OrderListSize\r
                           );\r
-  ASSERT (OrderList != NULL);\r
 \r
   for (OptionNumber = 0; ; OptionNumber++) {\r
-    for (Index = 0; Index < OrderListSize / sizeof (UINT16); Index++) {\r
-      if (OptionNumber == OrderList[Index]) {\r
-        break;\r
+    if (OrderList != NULL) {\r
+      for (Index = 0; Index < OrderListSize / sizeof (UINT16); Index++) {\r
+        if (OptionNumber == OrderList[Index]) {\r
+          break;\r
+        }\r
       }\r
     }\r
 \r