From 7f750fe77f6945e24fd62412e7924f8f455ccc4e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 2 Feb 2007 16:09:04 +0000 Subject: [PATCH] prevent state saving when disconnected from JACK git-svn-id: svn://localhost/ardour2/trunk@1406 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session_state.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 3b66f65cec..42aac479a1 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -589,6 +589,12 @@ Session::save_state (string snapshot_name, bool pending) return 1; } + if (!_engine.connected ()) { + error << _("Ardour's audio engine is not connected and state saving would lose all I/O connections. Session not saved") + << endmsg; + return 1; + } + tree.set_root (&get_state()); if (snapshot_name.empty()) {