From ed360080d0e7a4505eb3e90f3f9946754f0c779b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 11 Dec 2011 14:14:17 +0000 Subject: [PATCH] Sessions loaded from 2.X don't have a diskstream (yet) in Track::set_state(); prevent a crash, at least; not 100% sure if the behaviour is right, though. git-svn-id: svn://localhost/ardour2/branches/3.0@10975 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/track.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc index 8a4931d336..b17b8f523f 100644 --- a/libs/ardour/track.cc +++ b/libs/ardour/track.cc @@ -115,7 +115,9 @@ Track::set_state (const XMLNode& node, int version) } } - _diskstream->playlist()->set_orig_track_id (id()); + if (_diskstream) { + _diskstream->playlist()->set_orig_track_id (id()); + } /* set rec-enable control *AFTER* setting up diskstream, because it may want to operate on the diskstream as it sets its own state