diff --git a/mopidy/backends/despotify.py b/mopidy/backends/despotify.py index 646228c8..a60e2aac 100644 --- a/mopidy/backends/despotify.py +++ b/mopidy/backends/despotify.py @@ -120,4 +120,5 @@ class DespotifyBackend(BaseBackend): def search(self, type, what): query = u'%s:%s' % (type, what) result = self.spotify.search(query.encode(ENCODING)) - return self._to_mopidy_playlist(result.playlist).mpd_format() + if result is not None: + return self._to_mopidy_playlist(result.playlist).mpd_format()