diff --git a/audio/internal/cbackend/player.go b/audio/internal/cbackend/player.go index edf64e423..39f83582c 100644 --- a/audio/internal/cbackend/player.go +++ b/audio/internal/cbackend/player.go @@ -395,6 +395,8 @@ func (p *playerImpl) readSourceToBuffer() { } func (p *playerImpl) setErrorImpl(err error) { - p.err.Store(err) + if p.err.Load() == nil { + p.err.Store(err) + } p.closeImpl() } diff --git a/internal/ui/context.go b/internal/ui/context.go index d22c4ec00..7e5909aea 100644 --- a/internal/ui/context.go +++ b/internal/ui/context.go @@ -185,6 +185,9 @@ func (g *globalState) err() error { } func (g *globalState) setError(err error) { + if g.err_.Load() != nil { + return + } g.err_.Store(err) }