From cf1b4bacd13f0c9e69a250dc6fcec17aec50ecf6 Mon Sep 17 00:00:00 2001 From: The Wobbler Date: Tue, 4 Feb 2025 11:17:35 +0100 Subject: [PATCH] Added some checks so the player doesnt crash because of things removed in latest commits. --- wobuzz/ui/track_control.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wobuzz/ui/track_control.py b/wobuzz/ui/track_control.py index 753bb6b..f96d345 100644 --- a/wobuzz/ui/track_control.py +++ b/wobuzz/ui/track_control.py @@ -46,15 +46,15 @@ class TrackControl(QToolBar): self.next_button.triggered.connect(self.next_track) def previous_track(self): - if self.app.player.current_playlist.has_tracks(): + if self.app.player.current_playlist is not None and self.app.player.current_playlist.has_tracks(): self.app.player.previous_track() def stop(self): - if self.app.player.current_playlist.has_tracks(): + if self.app.player.current_playlist is not None and self.app.player.current_playlist.has_tracks(): self.app.player.stop() def next_track(self): - if self.app.player.current_playlist.has_tracks(): + if self.app.player.current_playlist is not None and self.app.player.current_playlist.has_tracks(): self.app.player.next_track() def on_track_change(self, previous_track, track):