fix or band-aid for #3649 (loading a session file might fail when using the session...
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 3 Jan 2011 15:17:18 +0000 (15:17 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 3 Jan 2011 15:17:18 +0000 (15:17 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8414 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/session_import_dialog.cc

index 6fdac9aa902f6ff69995749c44ed878c94ad6614..b5bdcc3cd660cc31cb9e2cda1037b8efabcf5372 100644 (file)
@@ -104,7 +104,10 @@ void
 SessionImportDialog::load_session (const string& filename)
 {
        if (_session) {
-               tree.read (filename);
+               if (tree.read (filename)) {
+                        error << string_compose (_("Cannot load XML for session from %1", filename)) << endmsg;
+                        return;
+                }
                boost::shared_ptr<AudioRegionImportHandler> region_handler (new AudioRegionImportHandler (tree, *_session));
                boost::shared_ptr<AudioPlaylistImportHandler> pl_handler (new AudioPlaylistImportHandler (tree, *_session, *region_handler));