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:
|
NSBundle:
|
||||||
- sharedFrameworksURL
|
- sharedFrameworksURL
|
||||||
- sharedSupportURL
|
- sharedSupportURL
|
||||||
- builtInPlugInsURL
|
|
||||||
- appStoreReceiptURL
|
- appStoreReceiptURL
|
||||||
- pathForAuxiliaryExecutable:
|
|
||||||
- privateFrameworksPath
|
|
||||||
- sharedFrameworksPath
|
- sharedFrameworksPath
|
||||||
- sharedSupportPath
|
- sharedSupportPath
|
||||||
+ URLsForResourcesWithExtension:subdirectory:inBundleWithURL:
|
+ URLsForResourcesWithExtension:subdirectory:inBundleWithURL:
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#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)
|
#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->_throughput = nil;
|
||||||
internal->_totalUnitCount = 0;
|
internal->_totalUnitCount = 0;
|
||||||
internal->_completedUnitCount = 0;
|
internal->_completedUnitCount = 0;
|
||||||
internal->_userInfo = [userInfo mutableCopy];
|
internal->_userInfo = RETAIN([userInfo mutableCopy]);
|
||||||
internal->_cancelled = NO;
|
internal->_cancelled = NO;
|
||||||
internal->_cancellable = NO;
|
internal->_cancellable = NO;
|
||||||
internal->_paused = NO;
|
internal->_paused = NO;
|
||||||
|
@ -104,7 +104,6 @@ static NSMutableDictionary *__subscribers = nil;
|
||||||
internal->_indeterminate = NO;
|
internal->_indeterminate = NO;
|
||||||
internal->_finished = NO;
|
internal->_finished = NO;
|
||||||
internal->_parent = parent; // this is a weak reference and not retained.
|
internal->_parent = parent; // this is a weak reference and not retained.
|
||||||
internal->_userInfo = [[NSMutableDictionary alloc] initWithCapacity: 10];
|
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -209,8 +208,12 @@ static NSMutableDictionary *__subscribers = nil;
|
||||||
|
|
||||||
- (NSString *) localizedDescription
|
- (NSString *) localizedDescription
|
||||||
{
|
{
|
||||||
return [NSString stringWithFormat: @"%f percent complete",
|
return _localizedDescription;
|
||||||
[self fractionCompleted]];
|
}
|
||||||
|
|
||||||
|
- (void) setLocalizedDescription: (NSString *)localDescription
|
||||||
|
{
|
||||||
|
ASSIGNCOPY(_localizedDescription, localDescription);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) localizedAddtionalDescription
|
- (NSString *) localizedAddtionalDescription
|
||||||
|
@ -219,6 +222,11 @@ static NSMutableDictionary *__subscribers = nil;
|
||||||
[self estimatedTimeRemaining]];
|
[self estimatedTimeRemaining]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) setLocalizedAdditionalDescription: (NSString *)localDescription
|
||||||
|
{
|
||||||
|
ASSIGNCOPY(_localizedAdditionalDescription, localDescription);
|
||||||
|
}
|
||||||
|
|
||||||
// Observing progress
|
// Observing progress
|
||||||
- (double) fractionCompleted
|
- (double) fractionCompleted
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,9 +5,6 @@
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
id obj1;
|
|
||||||
id obj2;
|
|
||||||
NSMutableArray *testObjs = [[NSMutableArray alloc] init];
|
|
||||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
NSDictionary *dict = [NSDictionary dictionary];
|
NSDictionary *dict = [NSDictionary dictionary];
|
||||||
NSProgress *progress = [[NSProgress alloc] initWithParent: nil
|
NSProgress *progress = [[NSProgress alloc] initWithParent: nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue