| Index: third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.cpp b/third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.cpp
|
| index 3ad18dff95ecf83ca31c08f8dd43b0fb2515872d..9239d9d5368cdd3e07d78ae573c94e47d8d1bc7f 100644
|
| --- a/third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.cpp
|
| +++ b/third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.cpp
|
| @@ -51,7 +51,14 @@ void WaveShaperProcessor::setCurve(DOMFloat32Array* curve)
|
| // This synchronizes with process().
|
| MutexLocker processLocker(m_processLock);
|
|
|
| - m_curve = curve;
|
| + // Copy the curve data, if any, to our internal buffer.
|
| + if (!curve) {
|
| + m_curve = nullptr;
|
| + return;
|
| + }
|
| +
|
| + m_curve = wrapUnique(new Vector<float>(curve->length()));
|
| + memcpy(m_curve->data(), curve->data(), sizeof(float)*curve->length());
|
| }
|
|
|
| void WaveShaperProcessor::setOversample(OverSampleType oversample)
|
|
|