From 8fa295410b4b04686e7a982fc6929a329b0ce547 Mon Sep 17 00:00:00 2001 From: rumtid Date: Mon, 17 Jun 2024 11:01:02 +0800 Subject: [PATCH] Fix a crash in set_auto_start() on arm64 (#419) --- src/utils/utils-mac.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/utils-mac.mm b/src/utils/utils-mac.mm index 42e6cbc3..ad805fa2 100644 --- a/src/utils/utils-mac.mm +++ b/src/utils/utils-mac.mm @@ -267,7 +267,7 @@ void set_auto_start(bool enabled) /*outLabel*/ NULL); if (err != noErr) { if (icon) - CFRelease(icon); + ReleaseIconRef(icon); icon = NULL; } } @@ -279,7 +279,7 @@ void set_auto_start(bool enabled) if (newItem) CFRelease(newItem); if (icon) - CFRelease(icon); + ReleaseIconRef(icon); } else if (!enabled && found) { LSSharedFileListItemRemove(loginItems, existingItem); }