Use main editor for loop-range undo/redo - fix crash

While CueEditor is-a HistoryOwner, session specific
changes such as Location don't belong in EditingContext.

This fixes a heap-use-after-free crash since MementoCommand
was free()ed twice. Once via ARDOUR::Location::~Location
and earlier due to direct Destructible::drop_references
from the History.

This partially reverts 04a8fb1eb6
This commit is contained in:
Robin Gareus 2025-08-20 21:16:31 +02:00
parent 8bfd8de2f6
commit 4b88330c9c
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
6 changed files with 39 additions and 37 deletions

View file

@ -1413,6 +1413,7 @@ private:
void set_loop_from_region (bool play);
void set_loop_range (Temporal::timepos_t const & start, Temporal::timepos_t const & end, std::string cmd);
void set_punch_range (Temporal::timepos_t const & start, Temporal::timepos_t const & end, std::string cmd);
void add_tempo_from_playhead_cursor ();