From 5c888f2b90d8840ba5f66c5c3820356adeca3df4 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 5 Sep 2023 18:29:50 +0200 Subject: [PATCH] Fix deadlock when cut/pasting section to itself --- libs/ardour/session.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 4bcf8aac09..b2a3d18e9d 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -7333,8 +7333,9 @@ Session::cut_copy_section (timepos_t const& start, timepos_t const& end, timepos XMLNode& tm_after (wmap->get_state()); add_command (new TempoCommand (_("cut tempo map"), &tm_before, &tm_after)); } else { - std::cerr << "no tempo map cut buffer\n"; delete &tm_before; + TempoMap::abort_update (); + TempoMap::SharedPtr tmap (TempoMap::fetch()); } if (abort_empty_reversible_command ()) {