mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-19 22:00:00 +10:00
Fix crashing on unknown SMBIOS
This commit is contained in:
+12
-9
@@ -103,12 +103,15 @@ class generate_defaults:
|
|||||||
# Native Macs (mainly M1s) will error out as they don't know what SMBIOS to spoof to
|
# Native Macs (mainly M1s) will error out as they don't know what SMBIOS to spoof to
|
||||||
# As we don't spoof on native models, we can safely ignore this
|
# As we don't spoof on native models, we can safely ignore this
|
||||||
spoof_model = model
|
spoof_model = model
|
||||||
if smbios_data.smbios_dictionary[spoof_model]["SecureBootModel"] is not None:
|
try:
|
||||||
if settings.sip_status is False:
|
if smbios_data.smbios_dictionary[spoof_model]["SecureBootModel"] is not None:
|
||||||
# Force VMM as root patching breaks .im4m signature
|
if settings.sip_status is False:
|
||||||
settings.secure_status = False
|
# Force VMM as root patching breaks .im4m signature
|
||||||
settings.force_vmm = True
|
settings.secure_status = False
|
||||||
else:
|
settings.force_vmm = True
|
||||||
# Allow SecureBootModel
|
else:
|
||||||
settings.secure_status = True
|
# Allow SecureBootModel
|
||||||
settings.force_vmm = False
|
settings.secure_status = True
|
||||||
|
settings.force_vmm = False
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user