mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Fix locking bug
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11373 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c68d2d7b75
commit
a28cf30923
2 changed files with 6 additions and 4 deletions
|
@ -70,9 +70,9 @@ static Class NSDictionaryClass;
|
|||
static Class NSMutableDictionaryClass;
|
||||
static Class NSStringClass;
|
||||
|
||||
static NSUserDefaults *sharedDefaults = nil;
|
||||
static NSMutableString *processName = nil;
|
||||
static NSMutableArray *userLanguages = nil;
|
||||
static NSUserDefaults *sharedDefaults = nil;
|
||||
static NSMutableString *processName = nil;
|
||||
static NSMutableArray *userLanguages = nil;
|
||||
static NSRecursiveLock *classLock = nil;
|
||||
|
||||
/*
|
||||
|
@ -1393,11 +1393,11 @@ GSUserDefaultsDictionaryRepresentation()
|
|||
{
|
||||
NSDictionary *defs;
|
||||
|
||||
[classLock lock];
|
||||
if (sharedDefaults == nil)
|
||||
{
|
||||
[NSUserDefaults standardUserDefaults];
|
||||
}
|
||||
[classLock lock];
|
||||
defs = [sharedDefaults dictionaryRepresentation];
|
||||
[classLock unlock];
|
||||
return defs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue