Take lock to add/remove custom MIDNAMs
update_custom_midnam() is usually called from the GUI or butler thread when a LV2 plugin is instantiated, or the plugin changes its MIDNAM. It must be exclusive with load_midnams_in_thread() and calls from MTAV to ::maybe_use().
This commit is contained in:
parent
69f6c9771e
commit
d03a3903a0
@ -105,6 +105,7 @@ MidiPatchManager::remove_custom_midnam (const std::string& id)
|
||||
bool
|
||||
MidiPatchManager::update_custom_midnam (const std::string& id, const std::string& midnam)
|
||||
{
|
||||
Glib::Threads::Mutex::Lock lm (_lock);
|
||||
remove_midi_name_document ("custom:" + id, false);
|
||||
return add_custom_midnam (id, midnam);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user