Bug 886618. Part 3: Handle null data in ConvolverNode. r=ehsan

--HG--
extra : rebase_source : 64e9c67937db1bea84bc3445d1e774782b5de419
This commit is contained in:
Robert O'Callahan 2013-06-29 17:32:18 +12:00
parent b3cb48347d
commit 7ef9b92ccb

View File

@ -188,7 +188,7 @@ ConvolverNode::SetBuffer(JSContext* aCx, AudioBuffer* aBuffer, ErrorResult& aRv)
uint32_t length = mBuffer->Length();
nsRefPtr<ThreadSharedFloatArrayBufferList> data =
mBuffer->GetThreadSharedChannelsForRate(aCx);
if (length < WEBAUDIO_BLOCK_SIZE) {
if (data && length < WEBAUDIO_BLOCK_SIZE) {
// For very small impulse response buffers, we need to pad the
// buffer with 0 to make sure that the Reverb implementation
// has enough data to compute FFTs from.