From 292cff7cfcd981a50ff9a58c2e7bb5555a1b62ba Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 2 Nov 2022 00:44:48 +0100 Subject: [PATCH] Prevent undo transaction crashes in optimized builds Worst case this will lead to undo operations not being saved rather than segfault (debug builds will still assert). --- libs/ardour/session_state.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index a862957e5a..3f438bc592 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -3344,6 +3344,9 @@ Session::commit_reversible_command (Command *cmd) { assert (_current_trans); assert (!_current_trans_quarks.empty ()); + if (!_current_trans) { + return; + } struct timeval now;