Fixed a crash that occurred when trying to start an empty playlist.
This commit is contained in:
parent
f0215c034a
commit
429ec8e683
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue