mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +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
01ea8ca061
commit
a68cd4592e
2 changed files with 6 additions and 4 deletions
|
@ -11,6 +11,8 @@
|
|||
* Documentation/gsdoc/NSNumber.gsdoc: document changes.
|
||||
* Documentation/gsdoc/NSString.gsdoc: document changes.
|
||||
* Testing/values.m: Added some number output tests.
|
||||
* Source/NSUserDefaults.m: Locking bug fixed ... was locking before
|
||||
lock had been created.
|
||||
|
||||
2001-11-09 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -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…
Reference in a new issue