mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-14 04:38:20 +10:00
kdk_handler: Verify path before iterating over
This commit is contained in:
@@ -2446,7 +2446,8 @@ class wx_python_gui:
|
||||
self.gpu_dropdown.Bind(wx.EVT_CHOICE, self.gpu_selection_click)
|
||||
self.gpu_dropdown.Centre(wx.HORIZONTAL)
|
||||
self.gpu_dropdown.SetToolTip(wx.ToolTip("Configures MXM GPU Vendor logic on pre-built models\nIf you are not using MXM iMacs, please leave this setting as is."))
|
||||
if self.computer.real_model not in ["iMac10,1", "iMac11,1", "iMac11,2", "iMac11,3", "iMac12,1", "iMac12,2"]:
|
||||
models = ["iMac10,1", "iMac11,1", "iMac11,2", "iMac11,3", "iMac12,1", "iMac12,2"]
|
||||
if (not self.constants.custom_model and self.computer.real_model not in models) or (self.constants.custom_model and self.constants.custom_model not in models):
|
||||
self.gpu_dropdown.Disable()
|
||||
|
||||
# Disable Thunderbolt
|
||||
|
||||
@@ -170,8 +170,9 @@ class kernel_debug_kit_handler:
|
||||
return False, error_msg
|
||||
|
||||
def is_kdk_installed(self, build):
|
||||
for file in Path("/Library/Developer/KDKs").iterdir():
|
||||
if file.is_dir():
|
||||
if build in file.name:
|
||||
return True
|
||||
if Path("/Library/Developer/KDKs").exists():
|
||||
for file in Path("/Library/Developer/KDKs").iterdir():
|
||||
if file.is_dir():
|
||||
if build in file.name:
|
||||
return True
|
||||
return False
|
||||
Reference in New Issue
Block a user