mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
fix bug resetting defaults
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32515 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b918c226f7
commit
99d5283104
2 changed files with 16 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2011-03-09 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSUserDefaults.m: Fix bug in resetting ... was ending up
|
||||
with an immutable dictionary for the registration domain.
|
||||
|
||||
2011-03-08 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSAttributedString.m: remove unused assignment
|
||||
|
|
|
@ -391,9 +391,18 @@ newLanguages(NSArray *oldNames)
|
|||
[classLock lock];
|
||||
NS_DURING
|
||||
{
|
||||
regDefs = [sharedDefaults volatileDomainForName: @"NSRegistrationDomain"];
|
||||
if (nil != sharedDefaults)
|
||||
if (nil == sharedDefaults)
|
||||
{
|
||||
regDefs = nil;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Extract the registration domain from the old defaults.
|
||||
*/
|
||||
regDefs = [[[sharedDefaults->_tempDomains
|
||||
objectForKey: NSRegistrationDomain] retain] autorelease];
|
||||
[sharedDefaults->_tempDomains
|
||||
removeObjectForKey: NSRegistrationDomain];
|
||||
|
||||
/* To ensure that we don't try to synchronise the old defaults to disk
|
||||
* after creating the new ones, remove as housekeeping notification
|
||||
|
|
Loading…
Reference in a new issue