This commit is contained in:
Qiu Yuzhou
2017-05-02 11:24:15 +08:00
parent 037366ff44
commit 6df0290d2f

View File

@ -151,7 +151,9 @@ func SyncSSLocal() {
changed = changed || generateSSLocalLauchAgentPlist() changed = changed || generateSSLocalLauchAgentPlist()
let mgr = ServerProfileManager.instance let mgr = ServerProfileManager.instance
if mgr.activeProfileId != nil { if mgr.activeProfileId != nil {
changed = changed || writeSSLocalConfFile((mgr.getActiveProfile()?.toJsonConfig())!) if let profile = mgr.getActiveProfile() {
changed = changed || writeSSLocalConfFile((profile.toJsonConfig()))
}
let on = UserDefaults.standard.bool(forKey: "ShadowsocksOn") let on = UserDefaults.standard.bool(forKey: "ShadowsocksOn")
if on { if on {