MdeModulePkg/UefiBootManagerLib: Fix crash when no load options are found
Do not attempt to sort the load options when there are none. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
This commit is contained in:
committed by
mergify[bot]
parent
b55530ad44
commit
07425903d3
@@ -437,6 +437,10 @@ EfiBootManagerSortLoadOptionVariable (
|
||||
|
||||
LoadOption = EfiBootManagerGetLoadOptions (&LoadOptionCount, OptionType);
|
||||
|
||||
if (LoadOptionCount == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Insertion sort algorithm
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user