From b432488876b12a27162bf9b70858cb1db3124892 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 12 Nov 2021 22:30:03 +0100 Subject: [PATCH] Prevent null pointer on music.spotify backend stop if the Librespot process has already been terminated --- platypush/backend/music/spotify/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platypush/backend/music/spotify/__init__.py b/platypush/backend/music/spotify/__init__.py index 5bcf5fbb2a..cd59432f8a 100644 --- a/platypush/backend/music/spotify/__init__.py +++ b/platypush/backend/music/spotify/__init__.py @@ -204,7 +204,8 @@ class MusicSpotifyBackend(Backend, SpotifyMixin): while not self.should_stop(): try: - self._librespot_proc.wait(timeout=1.0) + if self._librespot_proc: + self._librespot_proc.wait(timeout=1.0) except subprocess.TimeoutExpired: pass except Exception as e: