aboutsummaryrefslogtreecommitdiffstats
path: root/al/source.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'al/source.cpp')
-rw-r--r--al/source.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/al/source.cpp b/al/source.cpp
index c99943cf..f119ee36 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -3410,8 +3410,8 @@ FORCE_ALIGN void AL_APIENTRY alSourceQueueBuffersDirect(ALCcontext *context, ALu
for(ALsizei i{0};i < nb;i++)
{
bool fmt_mismatch{false};
- ALbuffer *buffer{nullptr};
- if(buffers[i] && (buffer=LookupBuffer(device, buffers[i])) == nullptr)
+ ALbuffer *buffer{buffers[i] ? LookupBuffer(device, buffers[i]) : nullptr};
+ if(buffers[i] && !buffer)
{
context->setError(AL_INVALID_NAME, "Queueing invalid buffer ID %u", buffers[i]);
goto buffer_error;