diff options
author | David Robillard <d@drobilla.net> | 2014-12-29 17:56:53 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-12-29 17:56:53 -0500 |
commit | 9b8760cf6938e65d1c85ba05b4ee1de7c9249df2 (patch) | |
tree | b885ab3972c1508b5b2489c96ab116547e4da64f /libs | |
parent | cf6e9d3412234c97513b89b4bd8d1f24c7373fe7 (diff) |
Avoid another potential deadlock for good measure.
Firing these signals while locked is not a good idea, Sequence/ControlList need
a better design for this that accounts for recording and lockedness.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/midi_region.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc index fe5c04be25..62c642d57b 100644 --- a/libs/ardour/midi_region.cc +++ b/libs/ardour/midi_region.cc @@ -446,8 +446,10 @@ MidiRegion::model_automation_state_changed (Evoral::Parameter const & p) for a given set of filtered_parameters, so now that we've changed that list we must invalidate the iterator. */ - Glib::Threads::Mutex::Lock lm (midi_source(0)->mutex()); - midi_source(0)->invalidate (lm); + Glib::Threads::Mutex::Lock lm (midi_source(0)->mutex(), Glib::Threads::TRY_LOCK); + if (lm.locked()) { + midi_source(0)->invalidate (lm); + } } /** This is called when a trim drag has resulted in a -ve _start time for this region. |