diff options
author | Sampo Savolainen <v2@iki.fi> | 2007-07-24 19:17:29 +0000 |
---|---|---|
committer | Sampo Savolainen <v2@iki.fi> | 2007-07-24 19:17:29 +0000 |
commit | 71452634a711cfeae4cf7eb9fbe7667210a071f1 (patch) | |
tree | d087cb8393a9b8e56d9fead60452b5537b175438 /libs | |
parent | 722ea289a7e3aa0e4c346d81c2ed99aa981ba77d (diff) |
Protect ardour from sessions with errant capture sources stored in the
session state.
git-svn-id: svn://localhost/ardour2/trunk@2177 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/audio_diskstream.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index ceee6467ab..14eef2961b 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -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())); |