1
1
mirror of https://github.com/danbee/persephone synced 2025-03-04 08:39:11 +00:00

Self *could* get deallocated here

This commit is contained in:
Daniel Barber 2020-02-14 13:58:44 -05:00
parent c0f8badbb5
commit 7f8e209970
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

View File

@ -113,9 +113,7 @@ class AlbumDetailView: NSViewController {
}
func getAlbumSongs(for album: Album) {
App.mpdClient.getAlbumSongs(for: album.mpdAlbum) { [weak self] (mpdSongs: [MPDClient.MPDSong]) in
guard let self = self else { return }
App.mpdClient.getAlbumSongs(for: album.mpdAlbum) { [self] (mpdSongs: [MPDClient.MPDSong]) in
self.dataSource.setAlbumSongs(
mpdSongs.map { Song(mpdSong: $0) }
)