OcBootManagementLib: Fix assertion on null device path
@@ -438,8 +438,15 @@ InternalGetDefaultBootEntry (
for (Index = 0; Index < NumBootEntries; ++Index) {
BootEntry = &BootEntries[Index];
+
+ if (BootEntry->IsCustom) {
+ continue;
+ }
+
OcDevicePath = BootEntry->DevicePath;
+ ASSERT (OcDevicePath != NULL);
+
if ((GetDevicePathSize (OcDevicePath) - END_DEVICE_PATH_LENGTH) < RootDevicePathSize) {
continue;
}
