OcAppleBootCompatLib: Fix null pointer dereference
@@ -537,12 +537,14 @@ OcExitBootServices (
//
// Handle events in case we have any.
//
+ if (BootCompat->Settings.ExitBootServicesHandlers != NULL) {
for (Index = 0; BootCompat->Settings.ExitBootServicesHandlers[Index] != NULL; ++Index) {
BootCompat->Settings.ExitBootServicesHandlers[Index] (
NULL,
BootCompat->Settings.ExitBootServicesHandlerContexts[Index]
);
}
+ }
//
// For non-macOS operating systems return directly.
