13
0

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:
Robin Gareus 2020-04-22 05:02:31 +02:00
parent 69f6c9771e
commit d03a3903a0
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -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);
}