Protect ardour from sessions with errant capture sources stored in the
authorSampo Savolainen <v2@iki.fi>
Tue, 24 Jul 2007 19:17:29 +0000 (19:17 +0000)
committerSampo Savolainen <v2@iki.fi>
Tue, 24 Jul 2007 19:17:29 +0000 (19:17 +0000)
session state.

git-svn-id: svn://localhost/ardour2/trunk@2177 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/audio_diskstream.cc

index ceee6467abb52cb22f9126929ae5fd409f792b0c..14eef2961bc1829f8e529125685430a1419b744f 100644 (file)
@@ -2255,6 +2255,12 @@ AudioDiskstream::use_pending_capture_data (XMLNode& node)
                                continue;
                        }
 
+                       // This protects sessions from errant CapturingSources in stored sessions
+                       struct stat sbuf;
+                       if (stat (prop->value().c_str(), &sbuf)) {
+                               continue;
+                       }
+
                        try {
                                fs = boost::dynamic_pointer_cast<AudioFileSource> (
                                        SourceFactory::createWritable (DataType::AUDIO, _session, prop->value(), false, _session.frame_rate()));