Make sure there's a buffer to render loopback samples to

This commit is contained in:
Chris Robinson 2011-08-12 15:44:21 -07:00
parent 412cec73de
commit 7e3d02d991

View File

@ -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);