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

@ -192,6 +192,7 @@ public:
}
virtual void add_location_mark_with_flag (Temporal::timepos_t const & where, ARDOUR::Location::Flags, int32_t cue_id) = 0;
virtual void remove_tracks () = 0;
virtual void set_loop_range (Temporal::timepos_t const & start, Temporal::timepos_t const & end, std::string cmd) = 0;
virtual void set_punch_range (Temporal::timepos_t const & start, Temporal::timepos_t const & end, std::string cmd) = 0;
void jump_forward_to_mark () {