Skip to content

Commit

Permalink
A better check to see if we can call the coverArt() method on a possi…
Browse files Browse the repository at this point in the history
…bly deleted object.

git-svn-id: file:///home/awy/mirror/slim/trunk/server@4690 62299810-d8cb-41fd-93b7-d32162e5a4a4
  • Loading branch information
Dan Sully committed Oct 19, 2005
1 parent 8408892 commit 2e7302c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Slim/Music/Import.pm
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ sub artScan {
my $track = $ds->objectForId('track', $artwork{$album});

# Make sure we have an object for the url, and it has a thumbnail.
if ($track && $track->isa('Slim::DataStores::DBI::Track') && $track->coverArt('thumb')) {
if (defined $track && $track->can('coverArt') && $track->coverArt('thumb')) {

$ds->setAlbumArtwork($track);
}
Expand Down

0 comments on commit 2e7302c

Please sign in to comment.