Skip to content

Commit b6dc6db

Browse files
committed
PluginManager: avoid copying invalide states while cloning plugins
1 parent 175a9a4 commit b6dc6db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/plugins/pluginManager.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ std::unique_ptr<Plugin> PluginManager::makePlugin(const Plugin& src, int sampleR
134134
int bufferSize, const model::Sequencer& sequencer)
135135
{
136136
std::unique_ptr<Plugin> p = makePlugin(src.getJuceId(), sampleRate, bufferSize, sequencer);
137-
p->setState(src.getState());
137+
if (src.getState().getSize() != 0)
138+
p->setState(src.getState());
138139
return p;
139140
}
140141

0 commit comments

Comments
 (0)