Prevent null pointer on music.spotify backend stop if the Librespot process has already been terminated

This commit is contained in:
Fabio Manganiello 2021-11-12 22:30:03 +01:00
parent 65d4740cd7
commit b432488876
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -204,7 +204,8 @@ class MusicSpotifyBackend(Backend, SpotifyMixin):
while not self.should_stop(): while not self.should_stop():
try: try:
self._librespot_proc.wait(timeout=1.0) if self._librespot_proc:
self._librespot_proc.wait(timeout=1.0)
except subprocess.TimeoutExpired: except subprocess.TimeoutExpired:
pass pass
except Exception as e: except Exception as e: