diff options
author | Robin Gareus <robin@gareus.org> | 2020-04-22 05:02:31 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-04-22 05:02:58 +0200 |
commit | d03a3903a0e9c50b88c1fed1b7554be60b38940f (patch) | |
tree | 77885f3131860d064590ef866851d12b17a50569 /libs/ardour/midi_patch_manager.cc | |
parent | 69f6c9771ecb07d2961f452cd58a12bc3401df29 (diff) |
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().
Diffstat (limited to 'libs/ardour/midi_patch_manager.cc')
-rw-r--r-- | libs/ardour/midi_patch_manager.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/ardour/midi_patch_manager.cc b/libs/ardour/midi_patch_manager.cc index 3d5c41ef42..1ceaa17924 100644 --- a/libs/ardour/midi_patch_manager.cc +++ b/libs/ardour/midi_patch_manager.cc @@ -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); } |