mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-23 15:16:25 +01:00
Fix Auditioner edge-case when synth cannot be loaded
This commit is contained in:
parent
c264ab6c95
commit
6b10987e4b
1 changed files with 5 additions and 4 deletions
|
|
@ -135,7 +135,9 @@ Auditioner::load_synth (bool need_lock)
|
||||||
unload_synth(need_lock);
|
unload_synth(need_lock);
|
||||||
|
|
||||||
boost::shared_ptr<Plugin> p = audition_synth_info->load (_session);
|
boost::shared_ptr<Plugin> p = audition_synth_info->load (_session);
|
||||||
|
if (p) {
|
||||||
asynth = boost::shared_ptr<Processor> (new PluginInsert (_session, p));
|
asynth = boost::shared_ptr<Processor> (new PluginInsert (_session, p));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -143,10 +145,9 @@ Auditioner::unload_synth (bool need_lock)
|
||||||
{
|
{
|
||||||
if (asynth) {
|
if (asynth) {
|
||||||
asynth->drop_references ();
|
asynth->drop_references ();
|
||||||
|
remove_processor (asynth, NULL, need_lock);
|
||||||
}
|
}
|
||||||
if (0 == remove_processor (asynth, NULL, need_lock)) {
|
|
||||||
asynth.reset ();
|
asynth.reset ();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue