From 71452634a711cfeae4cf7eb9fbe7667210a071f1 Mon Sep 17 00:00:00 2001 From: Sampo Savolainen Date: Tue, 24 Jul 2007 19:17:29 +0000 Subject: [PATCH] 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 --- libs/ardour/audio_diskstream.cc | 6 ++++++ 1 file changed, 6 insertions(+) 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 ( SourceFactory::createWritable (DataType::AUDIO, _session, prop->value(), false, _session.frame_rate()));