add some consistency checks

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39650 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2016-04-08 14:01:24 +00:00
parent b895350221
commit 3ff17a7572

View file

@ -89,7 +89,7 @@ static NSString *defaultsFile = @".GNUstepDefaults";
static NSUserDefaults *sharedDefaults = nil;
static NSDictionary *argumentsDictionary = nil;
static NSMutableString *processName = nil;
static NSString *processName = nil;
static NSRecursiveLock *classLock = nil;
static NSLock *syncLock = nil;
@ -585,6 +585,8 @@ newLanguages(NSArray *oldNames)
argumentsDictionary = [NSDictionary new];
[self registerAtExit];
processName = [[[NSProcessInfo processInfo] processName] copy];
/* Initialise the defaults flags to take values from the
* process arguments. These are otherwise set in updateCache()
* We do this early on so that the boolean argument settings can
@ -1131,16 +1133,6 @@ newLanguages(NSArray *oldNames)
self = [super init];
/*
* Global variable.
*/
if (processName == nil)
{
NSString *s = [[NSProcessInfo processInfo] processName];
processName = [s copy];
}
if (path == nil || [path isEqual: @""] == YES)
{
path = [GSDefaultsRootForUser(NSUserName())
@ -2293,6 +2285,7 @@ NSDictionary *GSPrivateDefaultLocale()
- (void) _changePersistentDomain: (NSString*)domainName
{
NSAssert(nil != domainName, NSInvalidArgumentException);
[_lock lock];
NS_DURING
{