From f7452c2a3a275356de32b4019a57034c7b8afe2f Mon Sep 17 00:00:00 2001 From: Johannes Mueller Date: Sun, 25 Jun 2017 21:21:56 +0200 Subject: [PATCH] Addressing #7371: don't trigger session->undo() from non-GUI-thread When triggering Session::undo() or Session::redo() from a non-GUI-thread (e.g. from a surface protocol) Ardour crashes if setting a CairoWidget dirty due to a ENSURE_GUI_THREAD assertion. (see #7371) By triggering undo by BasicUI::access_action() rather than by Session::undo() we ensure that the GUI thread will finally call Session::undo(). So more like a workaround ... but better than crashing :) --- libs/surfaces/control_protocol/basic_ui.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/surfaces/control_protocol/basic_ui.cc b/libs/surfaces/control_protocol/basic_ui.cc index d7563458ce..df8a18b855 100644 --- a/libs/surfaces/control_protocol/basic_ui.cc +++ b/libs/surfaces/control_protocol/basic_ui.cc @@ -328,13 +328,13 @@ BasicUI::get_transport_speed () void BasicUI::undo () { - session->undo (1); + access_action ("Editor/undo"); } void BasicUI::redo () { - session->redo (1); + access_action ("Editor/redo"); } void -- 2.30.2