diff --git a/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSBackgrounderDelegate.m b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSBackgrounderDelegate.m index d2d81face4..b636de954e 100644 --- a/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSBackgrounderDelegate.m +++ b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSBackgrounderDelegate.m @@ -166,10 +166,11 @@ //get link configuration NSData *prefData = (NSData*)CFPreferencesCopyValue((CFStringRef)PREFERENCE_LINK_CONFIGURATION, (CFStringRef)kAfsCommanderID, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); - linkConfiguration = (NSMutableDictionary*)[NSPropertyListSerialization propertyListFromData:prefData - mutabilityOption:NSPropertyListMutableContainers - format:nil - errorDescription:nil]; + NSDictionary *linkDict = (NSMutableDictionary*)[NSPropertyListSerialization propertyListFromData:prefData + mutabilityOption:NSPropertyListMutableContainers + format:nil + errorDescription:nil]; + linkConfiguration = [linkDict mutableCopy]; //get link enabled status NSNumber *linkEnabledStatus = (NSNumber*)CFPreferencesCopyValue((CFStringRef)PREFERENCE_USE_LINK, (CFStringRef)kAfsCommanderID, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); diff --git a/src/platform/DARWIN/AFSPreference/AFSCommanderPref.m b/src/platform/DARWIN/AFSPreference/AFSCommanderPref.m index dd6d9bfde8..1a06b02289 100644 --- a/src/platform/DARWIN/AFSPreference/AFSCommanderPref.m +++ b/src/platform/DARWIN/AFSPreference/AFSCommanderPref.m @@ -332,10 +332,11 @@ //link configuration NSData *prefData = (NSData*)CFPreferencesCopyValue((CFStringRef)PREFERENCE_LINK_CONFIGURATION, (CFStringRef)kAfsCommanderID, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); - linkConfiguration = (NSMutableDictionary*)[NSPropertyListSerialization propertyListFromData:prefData - mutabilityOption:NSPropertyListMutableContainers - format:nil - errorDescription:nil]; + NSDictionary *linkDict = (NSMutableDictionary*)[NSPropertyListSerialization propertyListFromData:prefData + mutabilityOption:NSPropertyListMutableContainers + format:nil + errorDescription:nil]; + linkConfiguration = [linkDict mutableCopy]; } // -------------------------------------------------------------------------------