Fixed yet another crash with the ratingiTunesCode ivar, I should just drop 10.6 and switch to ARC.
This commit is contained in:
1 parent
acd886df09
commit
b0258bfca5
3 files changed
+8
-5
No files matched your search
+2
-3
@@ -1351,11 +1351,10 @@ static const genreType_t genreType_strings[] = {
|
|||||||
if (![[tagsDict valueForKey:@"Rating"] isKindOfClass:[NSNumber class]] ||
|
if (![[tagsDict valueForKey:@"Rating"] isKindOfClass:[NSNumber class]] ||
|
||||||
[[tagsDict valueForKey:@"Rating"] unsignedIntegerValue] == [[MP42Ratings defaultManager] unknownIndex]) {
|
[[tagsDict valueForKey:@"Rating"] unsignedIntegerValue] == [[MP42Ratings defaultManager] unknownIndex]) {
|
||||||
if (!ratingiTunesCode) {
|
if (!ratingiTunesCode) {
|
||||||
NSLog(@"%@", [[MP42Ratings defaultManager] iTunesCodes]);
|
ratingiTunesCode = [[[[MP42Ratings defaultManager] iTunesCodes] objectAtIndex:[[MP42Ratings defaultManager] unknownIndex]] retain];
|
||||||
ratingiTunesCode = [[[MP42Ratings defaultManager] iTunesCodes] objectAtIndex:[[MP42Ratings defaultManager] unknownIndex]];
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ratingiTunesCode = [[[MP42Ratings defaultManager] iTunesCodes] objectAtIndex:[[tagsDict valueForKey:@"Rating"] unsignedIntegerValue]];
|
ratingiTunesCode = [[[[MP42Ratings defaultManager] iTunesCodes] objectAtIndex:[[tagsDict valueForKey:@"Rating"] unsignedIntegerValue]] retain];
|
||||||
}
|
}
|
||||||
NSString *ratingString = ratingiTunesCode;
|
NSString *ratingString = ratingiTunesCode;
|
||||||
if ([[tagsDict valueForKey:@"Rating Annotation"] length] && [ratingString length]) {
|
if ([[tagsDict valueForKey:@"Rating Annotation"] length] && [ratingString length]) {
|
||||||
|
|||||||
+2
-2
@@ -14,8 +14,8 @@
|
|||||||
NSMutableArray *iTunesCodes;
|
NSMutableArray *iTunesCodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@property(readonly) NSMutableArray *ratings;
|
@property(readonly) NSArray *ratings;
|
||||||
@property(readonly) NSMutableArray *iTunesCodes;
|
@property(readonly) NSArray *iTunesCodes;
|
||||||
|
|
||||||
+ (MP42Ratings *) defaultManager;
|
+ (MP42Ratings *) defaultManager;
|
||||||
|
|
||||||
|
|||||||
@@ -88,6 +88,10 @@
|
|||||||
return [NSArray arrayWithArray:ratings];
|
return [NSArray arrayWithArray:ratings];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSArray *) iTunesCodes {
|
||||||
|
return [NSArray arrayWithArray:iTunesCodes];
|
||||||
|
}
|
||||||
|
|
||||||
- (NSUInteger) unknownIndex {
|
- (NSUInteger) unknownIndex {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user