diff --git a/vst/SfizzVstProcessor.cpp b/vst/SfizzVstProcessor.cpp index ff2839fb..55877da3 100644 --- a/vst/SfizzVstProcessor.cpp +++ b/vst/SfizzVstProcessor.cpp @@ -342,6 +342,7 @@ void SfizzVstProcessor::doBackgroundWork() if (!std::strcmp(id, "LoadSfz")) { std::vector path(maxPathLen + 1); if (attr->getString("File", path.data(), maxPathLen) == kResultTrue) { + std::lock_guard lock(_processMutex); _state.sfzFile = Steinberg::String(path.data()).text8(); _synth->loadSfzFile(_state.sfzFile); }