Permalink
Browse files

Check that a track's path exists before adding it

Web tracks don't have paths...
  • Loading branch information...
1 parent e10c1dd commit 20249043beea7b62a84340f1808512db3e77f6b9 @jdelStrother committed Oct 30, 2008
Showing with 5 additions and 2 deletions.
  1. +5 −2 Album.m
View
@@ -131,8 +131,11 @@ +(NSString*)pathOfTrack:(NSDictionary*)track
-(NSArray*)tracks
{
NSMutableArray* trackPaths = [NSMutableArray array];
- nsenumerat(tracks, track)
- [trackPaths addObject:[Album pathOfTrack:track]];
+ nsenumerat(tracks, track) {
+ NSString* path = [Album pathOfTrack:track];
+ if (path)
+ [trackPaths addObject:path];
+ }
return [[trackPaths copy] autorelease];
}

0 comments on commit 2024904

Please sign in to comment.