aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-08-12 15:44:21 -0700
committerChris Robinson <[email protected]>2011-08-12 15:44:21 -0700
commit7e3d02d99143ecfeb388e7b2dd305ba2e69cea56 (patch)
tree84432c0c4c16bb2e87d851e30c242c284aa4c90a /Alc/ALc.c
parent412cec73de3e127bbfba9f91c9586089217621df (diff)
Make sure there's a buffer to render loopback samples to
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 653cb132..14469834 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -2937,7 +2937,7 @@ ALC_API void ALC_APIENTRY alcRenderSamplesSOFT(ALCdevice *device, ALCvoid *buffe
LockLists();
if(!IsDevice(device) || !device->IsLoopbackDevice)
alcSetError(device, ALC_INVALID_DEVICE);
- else if(samples < 0)
+ else if(samples < 0 || (samples > 0 && buffer == NULL))
alcSetError(device, ALC_INVALID_VALUE);
else
aluMixData(device, buffer, samples);