diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index ba77357829..af15797fba 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -3704,6 +3704,8 @@ Editor::abort_reversible_command () } } +#include "pbd/stacktrace.h" + void Editor::commit_reversible_command () { @@ -3716,6 +3718,7 @@ Editor::commit_reversible_command () } if (before.empty()) { + PBD::stacktrace(cerr, 30); cerr << "Please call begin_reversible_command() before commit_reversible_command()." << endl; } else { before.pop_back(); diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 18e16e02f6..4a49609193 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -3179,6 +3179,10 @@ void Session::add_command (Command* const cmd) { assert (_current_trans); + if (!_current_trans) { + error << "Attempted to add an UNDO command without a current transaction. ignoring command (" << cmd->name() << ")" << endl; + return; + } DEBUG_UNDO_HISTORY ( string_compose ("Current Undo Transaction %1, adding command: %2", _current_trans->name (),