mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-21 04:45:58 +01:00
Fix heap-use-after-free when drawing automation events
When drawing over existing automation it can happen that the range that is being replaced is currently being in the lookup cache.
This commit is contained in:
parent
b4ba3d2b9f
commit
2bfdbc161b
1 changed files with 7 additions and 1 deletions
|
|
@ -739,7 +739,13 @@ ControlList::editor_add_ordered (OrderedPoints const & points, bool with_guard)
|
|||
|
||||
timecnt_t distance = earliest.distance (latest);
|
||||
|
||||
(void) erase_range_internal (earliest, latest, _events);
|
||||
if (erase_range_internal (earliest, latest, _events)) {
|
||||
/* invalidate lookup cache
|
||||
* This is required since add_guard_point () may use the
|
||||
* cache to determine the value.
|
||||
*/
|
||||
mark_dirty ();
|
||||
}
|
||||
|
||||
if (with_guard) {
|
||||
unlocked_invalidate_insert_iterator ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue