diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift index a8300f0d..cc7ccb35 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift @@ -88,7 +88,7 @@ struct VwrPrefPaneDictionary: View { PrefMgr.shared.userDataFolderSpecified = newPath tbxUserDataPathSpecified = PrefMgr.shared.userDataFolderSpecified BookmarkManager.shared.saveBookmark(for: url) - (NSApp.delegate as! AppDelegate).updateDirectoryMonitorPath() + (NSApp.delegate as? AppDelegate)?.updateDirectoryMonitorPath() } else { IMEApp.buzz() if !bolPreviousFolderValidity { diff --git a/Source/Modules/WindowControllers/CtlPrefWindow.swift b/Source/Modules/WindowControllers/CtlPrefWindow.swift index 33d54bef..743eaf43 100644 --- a/Source/Modules/WindowControllers/CtlPrefWindow.swift +++ b/Source/Modules/WindowControllers/CtlPrefWindow.swift @@ -263,7 +263,7 @@ class CtlPrefWindow: NSWindowController { if LMMgr.checkIfSpecifiedUserDataFolderValid(newPath) { PrefMgr.shared.userDataFolderSpecified = newPath BookmarkManager.shared.saveBookmark(for: url) - (NSApp.delegate as! AppDelegate).updateDirectoryMonitorPath() + (NSApp.delegate as? AppDelegate)?.updateDirectoryMonitorPath() } else { IMEApp.buzz() if !bolPreviousFolderValidity {