diff --git a/Yattee/Core/AppEnvironment.swift b/Yattee/Core/AppEnvironment.swift index 8f00049e..7aeffd2c 100644 --- a/Yattee/Core/AppEnvironment.swift +++ b/Yattee/Core/AppEnvironment.swift @@ -229,7 +229,7 @@ final class AppEnvironment { // Wire up SMB client to check if SMB playback is active // This prevents crashes from concurrent libsmbclient usage let smbClientRef = self.smbClient - Task { + Task { [weak player] in await smbClientRef.setPlaybackActiveCallback { [weak player] in player?.state.isSMBPlaybackActive ?? false }