From 40f93ba6e0b7e8215d4f2942d30e34cc7cb688b9 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 22 Mar 2010 22:14:54 +0000 Subject: [PATCH] Add an assert and fix a crash on creating a new tape track. git-svn-id: svn://localhost/ardour2/branches/3.0@6785 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/audio_diskstream.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index 1f77964d0d..03f17c6e76 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -346,6 +346,8 @@ AudioDiskstream::setup_destructive_playlist () /* a single full-sized region */ + assert (!srcs.empty ()); + PropertyList plist; plist.add (Properties::name, _name.val()); plist.add (Properties::start, 0); @@ -1968,7 +1970,7 @@ AudioDiskstream::reset_write_sources (bool mark_write_complete, bool /*force*/) } } - if (destructive()) { + if (destructive() && !c->empty ()) { /* we now have all our write sources set up, so create the playlist's single region.