diff options
author | Chris Robinson <[email protected]> | 2019-08-21 03:00:19 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-08-21 03:00:19 -0700 |
commit | 024d5d900aa7f9e3435459b0a8cfe354dc8e21fd (patch) | |
tree | 5ebee1c6c6b254fecb4a5c97fc92a45f87a2307e /al | |
parent | bb46cec0b1acd8848774aedba45adb929108fa8e (diff) |
Dereference the correct buffer when destructing a source
Diffstat (limited to 'al')
-rw-r--r-- | al/source.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/al/source.cpp b/al/source.cpp index 95c3305e..49f2fb2a 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -3302,7 +3302,7 @@ ALsource::~ALsource() { std::unique_ptr<ALbufferlistitem> head{BufferList}; BufferList = head->mNext.load(std::memory_order_relaxed); - if(ALbuffer *buffer{BufferList->mBuffer}) DecrementRef(buffer->ref); + if(ALbuffer *buffer{head->mBuffer}) DecrementRef(buffer->ref); } queue = nullptr; |