summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-03-22 22:14:54 +0000
committerCarl Hetherington <carl@carlh.net>2010-03-22 22:14:54 +0000
commit40f93ba6e0b7e8215d4f2942d30e34cc7cb688b9 (patch)
tree0bd286e03c465770b5ce136d3ae1957ccf9dddf2
parent4d33dcd5d767738aea509a6077c92dba175a5b0c (diff)
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
-rw-r--r--libs/ardour/audio_diskstream.cc4
1 files changed, 3 insertions, 1 deletions
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.