Fixed another crash that was similar to the last one.

The crash occurred when the temporary playlist got deleted and then loaded again. It occurred because library.temporary_playlist didn't get set to None on deletion.
This commit is contained in:
The Wobbler 2025-02-28 19:38:29 +01:00
parent 7fdf7a66a9
commit 582448a024

View file

@ -312,6 +312,9 @@ class Playlist:
for track in self.tracks: # remove items that corresponded to the track and this playlist
track.delete_items(self)
if self == self.app.library.temporary_playlist:
self.app.library.temporary_playlist = None
self.app.utils.unique_names.remove(self.title)
self.app.library.playlists.remove(self)