From 92073256980dd8d677c3e7a9ec412d1de329ce06 Mon Sep 17 00:00:00 2001 From: xenakios Date: Thu, 23 Nov 2017 17:57:37 +0200 Subject: [PATCH] Lock mutex when restoring plugin state --- Source/PluginProcessor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index 75d0969..81b7e42 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -356,9 +356,10 @@ void PaulstretchpluginAudioProcessor::getStateInformation (MemoryBlock& destData void PaulstretchpluginAudioProcessor::setStateInformation (const void* data, int sizeInBytes) { - ValueTree tree = ValueTree::readFromData(data, sizeInBytes); + ValueTree tree = ValueTree::readFromData(data, sizeInBytes); if (tree.isValid()) { + std::lock_guard locker(m_mutex); for (int i = 0; i