diff options
author | Chris Robinson <[email protected]> | 2020-08-27 21:10:00 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-08-27 21:10:00 -0700 |
commit | 0ad7bb577a008209c04a9fafc9b981262c6f3692 (patch) | |
tree | 4b425116b2a90d7e44d86df6bb3b546b4540d03b | |
parent | 3c09f17421476d017d4fe5ea8c6010931c06bcd4 (diff) |
Don't allow callback buffers for effect slots
-rw-r--r-- | al/auxeffectslot.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp index 790db24f..5b2a7f44 100644 --- a/al/auxeffectslot.cpp +++ b/al/auxeffectslot.cpp @@ -453,9 +453,13 @@ START_API_FUNC { buffer = LookupBuffer(device, static_cast<ALuint>(value)); if(!buffer) SETERR_RETURN(context, AL_INVALID_VALUE,, "Invalid buffer ID"); + if(buffer->Callback) + SETERR_RETURN(context, AL_INVALID_OPERATION,, + "Callback buffer not valid for effects"); + + IncrementRef(buffer->ref); } - if(buffer) IncrementRef(buffer->ref); if(ALbuffer *oldbuffer{slot->Buffer}) DecrementRef(oldbuffer->ref); slot->Buffer = buffer; |