mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
audio/internal/cbackend: bug fix: use CompareAndSwap
This commit is contained in:
parent
35f268dfc3
commit
6a1c17b06f
@ -395,8 +395,6 @@ func (p *playerImpl) readSourceToBuffer() {
|
||||
}
|
||||
|
||||
func (p *playerImpl) setErrorImpl(err error) {
|
||||
if p.err.Load() == nil {
|
||||
p.err.Store(err)
|
||||
}
|
||||
p.err.CompareAndSwap(nil, err)
|
||||
p.closeImpl()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user