mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 14:10:51 +10:00
kdk_handler: Verify path before iterating over
This commit is contained in:
+2
-1
@@ -2446,7 +2446,8 @@ class wx_python_gui:
|
|||||||
self.gpu_dropdown.Bind(wx.EVT_CHOICE, self.gpu_selection_click)
|
self.gpu_dropdown.Bind(wx.EVT_CHOICE, self.gpu_selection_click)
|
||||||
self.gpu_dropdown.Centre(wx.HORIZONTAL)
|
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."))
|
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()
|
self.gpu_dropdown.Disable()
|
||||||
|
|
||||||
# Disable Thunderbolt
|
# Disable Thunderbolt
|
||||||
|
|||||||
@@ -170,8 +170,9 @@ class kernel_debug_kit_handler:
|
|||||||
return False, error_msg
|
return False, error_msg
|
||||||
|
|
||||||
def is_kdk_installed(self, build):
|
def is_kdk_installed(self, build):
|
||||||
for file in Path("/Library/Developer/KDKs").iterdir():
|
if Path("/Library/Developer/KDKs").exists():
|
||||||
if file.is_dir():
|
for file in Path("/Library/Developer/KDKs").iterdir():
|
||||||
if build in file.name:
|
if file.is_dir():
|
||||||
return True
|
if build in file.name:
|
||||||
|
return True
|
||||||
return False
|
return False
|
||||||
Reference in New Issue
Block a user