From fc59019513042834ee242c679db3fa05641019cc Mon Sep 17 00:00:00 2001 From: anhoder Date: Tue, 12 Sep 2023 22:53:57 +0800 Subject: [PATCH] fix: err --- internal/state_handler/state_handler_darwin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/state_handler/state_handler_darwin.go b/internal/state_handler/state_handler_darwin.go index 582203e..d15f822 100644 --- a/internal/state_handler/state_handler_darwin.go +++ b/internal/state_handler/state_handler_darwin.go @@ -122,8 +122,8 @@ func (s *Handler) SetPlayingInfo(info PlayingInfo) { if i := image.InitWithContentsOfURL(url); i.ID > 0 { image = i s.curArtwork = mediaplayer.MPMediaItemArtwork_alloc().InitWithImage(image) + defer image.Release() } - defer image.Release() } s.l.Unlock() if s.curArtwork.ID > 0 {