Fixed yet another crash with the ratingiTunesCode ivar, I should just drop 10.6 and switch to ARC.

This commit is contained in:
Damiano Galassi committed 2014-11-08 08:19:37 +01:00
1 parent acd886df09
commit b0258bfca5
3 files changed
+8 -5

No files matched your search

+2 -3
View File
@@ -1351,11 +1351,10 @@ static const genreType_t genreType_strings[] = {
if (![[tagsDict valueForKey:@"Rating"] isKindOfClass:[NSNumber class]] ||
[[tagsDict valueForKey:@"Rating"] unsignedIntegerValue] == [[MP42Ratings defaultManager] unknownIndex]) {
if (!ratingiTunesCode) {
NSLog(@"%@", [[MP42Ratings defaultManager] iTunesCodes]);
ratingiTunesCode = [[[MP42Ratings defaultManager] iTunesCodes] objectAtIndex:[[MP42Ratings defaultManager] unknownIndex]];
ratingiTunesCode = [[[[MP42Ratings defaultManager] iTunesCodes] objectAtIndex:[[MP42Ratings defaultManager] unknownIndex]] retain];
}
} else {
ratingiTunesCode = [[[MP42Ratings defaultManager] iTunesCodes] objectAtIndex:[[tagsDict valueForKey:@"Rating"] unsignedIntegerValue]];
ratingiTunesCode = [[[[MP42Ratings defaultManager] iTunesCodes] objectAtIndex:[[tagsDict valueForKey:@"Rating"] unsignedIntegerValue]] retain];
}
NSString *ratingString = ratingiTunesCode;
if ([[tagsDict valueForKey:@"Rating Annotation"] length] && [ratingString length]) {