Fix crash if no audition synth is unset

This was possible if a user explicitly selects "-none-" from
the instrument dropdown.
This commit is contained in:
Robin Gareus 2021-04-16 22:14:25 +02:00
parent b928c62e49
commit c0fe67427d
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -130,6 +130,14 @@ void
Auditioner::load_synth (bool need_lock)
{
unload_synth(need_lock);
if (!audition_synth_info) {
lookup_fallback_synth ();
}
if (!audition_synth_info) {
return;
}
boost::shared_ptr<Plugin> p = audition_synth_info->load (_session);
if (p) {