Fixed a crash that occurred when trying to start an empty playlist.

This commit is contained in:
The Wobbler 2025-02-01 13:07:10 +01:00
parent f0215c034a
commit 429ec8e683

View file

@ -38,7 +38,8 @@ class PlaylistTabBar(QTabBar):
playlist_view = self.tab_widget.widget(index)
playlist = playlist_view.playlist
self.app.player.start_playlist(playlist)
if playlist.has_tracks(): # dont crash when playlist is empty
self.app.player.start_playlist(playlist)
def contextMenuEvent(self, event: QContextMenuEvent, title=None):
# get title by self.tabAt() if the event is called from PyQt, else its executed from the tab title and getting