fix possible crash when setting delivery name w/o panshell
[ardour.git] / libs / ardour / audiofilesource.cc
index 014baa90317b13c420af7c9863378ef6ddd4f976..299b5a2bb5480ccaecdbaa22a3ba9a249193c3b9 100644 (file)
@@ -115,6 +115,22 @@ AudioFileSource::AudioFileSource (Session& s, const string& path, const string&
        }
 }
 
+/** Constructor used for existing internal-to-session files during crash
+ * recovery. File must exist
+ */
+AudioFileSource::AudioFileSource (Session& s, const string& path, Source::Flag flags, bool /* ignored-exists-for-prototype differentiation */)
+       : Source (s, DataType::AUDIO, path, flags)
+       , AudioSource (s, path)
+       , FileSource (s, DataType::AUDIO, path, string(), flags)
+{
+        /* note that origin remains empty */
+
+       if (init (_path, true)) {
+               throw failed_constructor ();
+       }
+}
+
+
 /** Constructor used for existing internal-to-session files via XML.  File must exist. */
 AudioFileSource::AudioFileSource (Session& s, const XMLNode& node, bool must_exist)
        : Source (s, node)