Lock mutex when restoring plugin state

This commit is contained in:
xenakios 2017-11-23 17:57:37 +02:00
parent 321e9bbf1c
commit 9207325698

View File

@ -359,6 +359,7 @@ void PaulstretchpluginAudioProcessor::setStateInformation (const void* data, int
ValueTree tree = ValueTree::readFromData(data, sizeInBytes); ValueTree tree = ValueTree::readFromData(data, sizeInBytes);
if (tree.isValid()) if (tree.isValid())
{ {
std::lock_guard<std::mutex> locker(m_mutex);
for (int i = 0; i<getNumParameters(); ++i) for (int i = 0; i<getNumParameters(); ++i)
{ {
auto par = getFloatParameter(i); auto par = getFloatParameter(i);