diff --git a/CHANGELOG.md b/CHANGELOG.md index 95e272a4f..0eb6a07b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Add support for `gktool` in PKG postinstall scripts - Removes Gatekeeper "verifying" prompt on first launch after PKG installation - Note `gktool` is only available on macOS Sonoma and newer +- Resolve unpatching crash edge case when host doesn't require patches. ## 1.5.0 - Restructure project directories diff --git a/opencore_legacy_patcher/sys_patch/sys_patch_auto.py b/opencore_legacy_patcher/sys_patch/sys_patch_auto.py index d840f04d7..ca6d0bab8 100644 --- a/opencore_legacy_patcher/sys_patch/sys_patch_auto.py +++ b/opencore_legacy_patcher/sys_patch/sys_patch_auto.py @@ -148,7 +148,7 @@ Please check the Github page for more information about this release.""" logging.info("- Detected Snapshot seal intact, detecting patches") patches = sys_patch_detect.DetectRootPatch(self.constants.computer.real_model, self.constants).detect_patch_set() if not any(not patch.startswith("Settings") and not patch.startswith("Validation") and patches[patch] is True for patch in patches): - patches = [] + patches = {} if patches: logging.info("- Detected applicable patches, determining whether possible to patch") if patches["Validation: Patching Possible"] is False: diff --git a/opencore_legacy_patcher/wx_gui/gui_sys_patch_display.py b/opencore_legacy_patcher/wx_gui/gui_sys_patch_display.py index cd1aabdd6..40febb011 100644 --- a/opencore_legacy_patcher/wx_gui/gui_sys_patch_display.py +++ b/opencore_legacy_patcher/wx_gui/gui_sys_patch_display.py @@ -111,7 +111,7 @@ class SysPatchDisplayFrame(wx.Frame): if not any(not patch.startswith("Settings") and not patch.startswith("Validation") and patches[patch] is True for patch in patches): logging.info("No applicable patches available") - patches = [] + patches = {} # Check if OCLP has already applied the same patches no_new_patches = not self._check_if_new_patches_needed(patches) if patches else False