diff --git a/alt-tab-macos/Info.plist b/alt-tab-macos/Info.plist
index dbdf52ee..46a6c5c1 100644
--- a/alt-tab-macos/Info.plist
+++ b/alt-tab-macos/Info.plist
@@ -30,5 +30,7 @@
1
ATSApplicationFontsPath
+ NSSupportsSuddenTermination
+ true
diff --git a/alt-tab-macos/logic/Preferences.swift b/alt-tab-macos/logic/Preferences.swift
index 88e9b1c9..ccccd577 100644
--- a/alt-tab-macos/logic/Preferences.swift
+++ b/alt-tab-macos/logic/Preferences.swift
@@ -130,7 +130,9 @@ class Preferences {
}
static func saveRawToDisk() throws {
+ ProcessInfo.processInfo.disableSuddenTermination()
try saveToDisk(rawValues, userFile)
+ ProcessInfo.processInfo.enableSuddenTermination()
}
private static func preferencesVersion(_ url: URL) throws -> Int {
diff --git a/alt-tab-macos/ui/preferences-window/PreferencesWindow.swift b/alt-tab-macos/ui/preferences-window/PreferencesWindow.swift
index 7e5559bc..b5b3585d 100644
--- a/alt-tab-macos/ui/preferences-window/PreferencesWindow.swift
+++ b/alt-tab-macos/ui/preferences-window/PreferencesWindow.swift
@@ -35,8 +35,8 @@ class PreferencesWindow: NSWindow {
throw NSError.make(domain: "Preferences", message: "Please enter a valid value for '" + key + "'")
}
try Preferences.updateAndValidateFromString(key, newValue)
- (App.shared as! App).initPreferencesDependentComponents()
try Preferences.saveRawToDisk()
+ (App.shared as! App).initPreferencesDependentComponents()
} catch let error {
debugPrint("PreferencesWindow: save: error", key, newValue, error)
showSaveErrorSheetModal(error as NSError, senderControl, key, previousValue) // allows recursive call by user choice