mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
Fix crash due to dictionary
This commit is contained in:
parent
8372fac3c0
commit
0f09fefac3
4 changed files with 13 additions and 11 deletions
|
@ -92,10 +92,7 @@ NSAttributedString:
|
|||
NSBundle:
|
||||
- sharedFrameworksURL
|
||||
- sharedSupportURL
|
||||
- builtInPlugInsURL
|
||||
- appStoreReceiptURL
|
||||
- pathForAuxiliaryExecutable:
|
||||
- privateFrameworksPath
|
||||
- sharedFrameworksPath
|
||||
- sharedSupportPath
|
||||
+ URLsForResourcesWithExtension:subdirectory:inBundleWithURL:
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
@class NSString, NSDictionary, NSArray, NSNumber, NSProgress;
|
||||
@class NSString, NSDictionary, NSArray, NSNumber, NSURL, NSProgress;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_9, GS_API_LATEST)
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ static NSMutableDictionary *__subscribers = nil;
|
|||
internal->_throughput = nil;
|
||||
internal->_totalUnitCount = 0;
|
||||
internal->_completedUnitCount = 0;
|
||||
internal->_userInfo = [userInfo mutableCopy];
|
||||
internal->_userInfo = RETAIN([userInfo mutableCopy]);
|
||||
internal->_cancelled = NO;
|
||||
internal->_cancellable = NO;
|
||||
internal->_paused = NO;
|
||||
|
@ -104,7 +104,6 @@ static NSMutableDictionary *__subscribers = nil;
|
|||
internal->_indeterminate = NO;
|
||||
internal->_finished = NO;
|
||||
internal->_parent = parent; // this is a weak reference and not retained.
|
||||
internal->_userInfo = [[NSMutableDictionary alloc] initWithCapacity: 10];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -209,8 +208,12 @@ static NSMutableDictionary *__subscribers = nil;
|
|||
|
||||
- (NSString *) localizedDescription
|
||||
{
|
||||
return [NSString stringWithFormat: @"%f percent complete",
|
||||
[self fractionCompleted]];
|
||||
return _localizedDescription;
|
||||
}
|
||||
|
||||
- (void) setLocalizedDescription: (NSString *)localDescription
|
||||
{
|
||||
ASSIGNCOPY(_localizedDescription, localDescription);
|
||||
}
|
||||
|
||||
- (NSString *) localizedAddtionalDescription
|
||||
|
@ -219,6 +222,11 @@ static NSMutableDictionary *__subscribers = nil;
|
|||
[self estimatedTimeRemaining]];
|
||||
}
|
||||
|
||||
- (void) setLocalizedAdditionalDescription: (NSString *)localDescription
|
||||
{
|
||||
ASSIGNCOPY(_localizedAdditionalDescription, localDescription);
|
||||
}
|
||||
|
||||
// Observing progress
|
||||
- (double) fractionCompleted
|
||||
{
|
||||
|
|
|
@ -5,9 +5,6 @@
|
|||
|
||||
int main()
|
||||
{
|
||||
id obj1;
|
||||
id obj2;
|
||||
NSMutableArray *testObjs = [[NSMutableArray alloc] init];
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
NSDictionary *dict = [NSDictionary dictionary];
|
||||
NSProgress *progress = [[NSProgress alloc] initWithParent: nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue