diff options
Diffstat (limited to 'al')
-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; |