From 405574184a80f75ebe085f73b056da33f83f668b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 6 Oct 2023 16:17:06 -0600 Subject: [PATCH] use a RegionWriteLock while modifying Playlist region list in ::region_bounds_changed --- libs/ardour/playlist.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index 9bb5d0259c..6b7d41ed13 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -1650,8 +1650,13 @@ Playlist::region_bounds_changed (const PropertyChange& what_changed, std::shared return; } - regions.erase (i); - regions.insert (upper_bound (regions.begin (), regions.end (), region, cmp), region); + { + RegionWriteLock rl (this); + + regions.erase (i); + regions.insert (upper_bound (regions.begin (), regions.end (), region, cmp), region); + } + if (holding_state ()) { pending_bounds.push_back (region); @@ -3577,4 +3582,3 @@ Playlist::time_domain_changed () } #endif } -