mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
Ensure defaults are synchronized before a reset.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14348 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
99be9b9e68
commit
a9de34eb69
2 changed files with 5 additions and 1 deletions
|
@ -1689,9 +1689,12 @@ static inline int getDigits(const char *from, char *to, int limit)
|
||||||
*/
|
*/
|
||||||
if ([date isKindOfClass: [NSCalendarDate class]])
|
if ([date isKindOfClass: [NSCalendarDate class]])
|
||||||
tmp = (NSCalendarDate*)RETAIN(date);
|
tmp = (NSCalendarDate*)RETAIN(date);
|
||||||
else
|
else if ([date isKindOfClass: [NSDate class]])
|
||||||
tmp = [[NSCalendarDate alloc] initWithTimeIntervalSinceReferenceDate:
|
tmp = [[NSCalendarDate alloc] initWithTimeIntervalSinceReferenceDate:
|
||||||
[date timeIntervalSinceReferenceDate]];
|
[date timeIntervalSinceReferenceDate]];
|
||||||
|
else
|
||||||
|
[NSException raise: NSInvalidArgumentException
|
||||||
|
format: @"%@ invalid date given", NSStringFromSelector(_cmd)];
|
||||||
|
|
||||||
end = (NSCalendarDate*)[self laterDate: tmp];
|
end = (NSCalendarDate*)[self laterDate: tmp];
|
||||||
if (end == self)
|
if (end == self)
|
||||||
|
|
|
@ -219,6 +219,7 @@ static BOOL setSharedDefaults = NO; /* Flag to prevent infinite recursion */
|
||||||
{
|
{
|
||||||
NSDictionary *regDefs;
|
NSDictionary *regDefs;
|
||||||
|
|
||||||
|
[sharedDefaults synchronize]; // Ensure changes are written.
|
||||||
regDefs = RETAIN([sharedDefaults->_tempDomains
|
regDefs = RETAIN([sharedDefaults->_tempDomains
|
||||||
objectForKey: NSRegistrationDomain]);
|
objectForKey: NSRegistrationDomain]);
|
||||||
setSharedDefaults = NO;
|
setSharedDefaults = NO;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue