Fixed another missing NoneType check.

This commit is contained in:
The Wobbler 2025-02-28 18:02:06 +01:00
parent a9f07f0716
commit 37f1ea3ff8

View file

@ -92,10 +92,11 @@ class Library:
playlist_tabs.addTab(playlist_view, playlist.title)
def replace_temporary_playlist(self, replace: Playlist):
self.temporary_playlist.delete()
if self.temporary_playlist is not None:
self.temporary_playlist.delete()
if self.temporary_playlist in self.playlists:
self.playlists.remove(self.temporary_playlist)
if self.temporary_playlist in self.playlists:
self.playlists.remove(self.temporary_playlist)
if not replace in self.playlists:
self.playlists.append(replace)