Make sure ardour does not crash if there is are audio diskstreams with
authorSampo Savolainen <v2@iki.fi>
Fri, 11 Apr 2008 16:49:25 +0000 (16:49 +0000)
committerSampo Savolainen <v2@iki.fi>
Fri, 11 Apr 2008 16:49:25 +0000 (16:49 +0000)
no IO's associated with them. We still need to add a warning to the user
about the inconsistency in the ardour file.

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3250 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/audio_diskstream.cc

index 33e7c373cd288e6d1817b1c16926273c0d679056..95040ed239c90963f2c7c7cadb1d982f60663473 100644 (file)
@@ -527,7 +527,7 @@ AudioDiskstream::process (nframes_t transport_frame, nframes_t nframes, nframes_
 
        commit_should_unlock = false;
 
-       if (!_io->active()) {
+       if (!_io || !_io->active()) {
                _processed = true;
                return 0;
        }
@@ -832,7 +832,7 @@ AudioDiskstream::commit (nframes_t nframes)
 {
        bool need_butler = false;
 
-       if (!_io->active()) {
+       if (!_io || !_io->active()) {
                return false;
        }