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:
Jeff Brasen
2025-06-10 15:42:19 -07:00
committed by mergify[bot]
parent b55530ad44
commit 07425903d3

View File

@@ -437,6 +437,10 @@ EfiBootManagerSortLoadOptionVariable (
LoadOption = EfiBootManagerGetLoadOptions (&LoadOptionCount, OptionType);
if (LoadOptionCount == 0) {
return;
}
//
// Insertion sort algorithm
//