diff options
-rw-r--r-- | IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c index 1ca93fd886..2cfc3b817a 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c @@ -1380,6 +1380,7 @@ BOpt_GetOptionNumber ( OrderListSize = 0;
OrderList = NULL;
OptionNumber = 0;
+ Index = 0;
UnicodeSPrint (StrTemp, sizeof (StrTemp), L"%sOrder", Type);
@@ -1388,12 +1389,13 @@ BOpt_GetOptionNumber ( &gEfiGlobalVariableGuid,
&OrderListSize
);
- ASSERT (OrderList != NULL);
for (OptionNumber = 0; ; OptionNumber++) {
- for (Index = 0; Index < OrderListSize / sizeof (UINT16); Index++) {
- if (OptionNumber == OrderList[Index]) {
- break;
+ if (OrderList != NULL) {
+ for (Index = 0; Index < OrderListSize / sizeof (UINT16); Index++) {
+ if (OptionNumber == OrderList[Index]) {
+ break;
+ }
}
}
|