diff --git a/mopidy/frontends/mpd/protocol/music_db.py b/mopidy/frontends/mpd/protocol/music_db.py index 972f5840..e70815f8 100644 --- a/mopidy/frontends/mpd/protocol/music_db.py +++ b/mopidy/frontends/mpd/protocol/music_db.py @@ -242,9 +242,10 @@ def _list_albumartist(context, query): albumartists = set() results = context.core.library.find_exact(**query).get() for track in _get_tracks(results): - for artist in track.album.artists: - if artist.name: - albumartists.add(('AlbumArtist', artist.name)) + if track.album: + for artist in track.album.artists: + if artist.name: + albumartists.add(('AlbumArtist', artist.name)) return albumartists