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:
rfm 2011-03-09 11:12:30 +00:00
parent ca3e96799a
commit cda7a4cc75
2 changed files with 16 additions and 2 deletions

View file

@ -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