diff data/fileio/DataFileReaderFactory.cpp @ 308:14e0f60435b8

* Make it possible to drop audio files, layer files, session files and images onto SV panes. Need to do a bit more work on where we expect the dropped file to go, particularly in the case of audio files -- at the moment they're always opened in new panes, but it may be better to by default replace whatever is in the target pane.
author Chris Cannam
date Wed, 10 Oct 2007 15:18:02 +0000
parents 4b2ea82fd0ed
children 183ee2a55fc7
line wrap: on
line diff
--- a/data/fileio/DataFileReaderFactory.cpp	Wed Oct 10 10:22:34 2007 +0000
+++ b/data/fileio/DataFileReaderFactory.cpp	Wed Oct 10 15:18:02 2007 +0000
@@ -53,9 +53,13 @@
     DataFileReader *reader = createReader(path, mainModelSampleRate);
     if (!reader) return NULL;
 
-    Model *model = reader->load();
-    delete reader;
-
-    return model;
+    try {
+        Model *model = reader->load();
+        delete reader;
+        return model;
+    } catch (Exception) {
+        delete reader;
+        throw;
+    }
 }