fix crash when copy'ing latent plugins
[ardour.git] / libs / ardour / location_importer.cc
index 655a8f1a848c0b641582b881a6110f084f3ae5a1..87c304ff9e264238fa9dfa9e29016cdafccf6b5b 100644 (file)
@@ -27,7 +27,7 @@
 #include "pbd/convert.h"
 #include "pbd/failed_constructor.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace PBD;
@@ -46,7 +46,7 @@ LocationImportHandler::LocationImportHandler (XMLTree const & source, Session &
 
        // Construct importable locations
        XMLNodeList const & locations = location_node->children();
-       for (XMLNodeList::const_iterator it = locations.begin(); it != locations.end(); it++) {
+       for (XMLNodeList::const_iterator it = locations.begin(); it != locations.end(); ++it) {
                try {
                        elements.push_back (ElementPtr ( new LocationImporter (source, session, *this, **it)));
                } catch (failed_constructor err) {
@@ -104,7 +104,7 @@ LocationImporter::~LocationImporter ()
 string
 LocationImporter::get_info () const
 {
-       nframes_t start, end;
+       framepos_t start, end;
        Timecode::Time start_time, end_time;
 
        // Get sample positions
@@ -133,7 +133,7 @@ bool
 LocationImporter::_prepare_move ()
 {
        try {
-               Location const original (xml_location);
+               Location const original (session, xml_location);
                location = new Location (original); // Updates id
        } catch (failed_constructor& err) {
                throw std::runtime_error (X_("Error in session file!"));