fix crash when copy'ing latent plugins
[ardour.git] / libs / ardour / export_preset.cc
index e26f4175f4661df65aa8a500ba2b060634f02356..dec4c4b79a63200753444e39c4788b0ee4d06cd5 100644 (file)
@@ -30,7 +30,7 @@ ExportPreset::ExportPreset (string filename, Session & s) :
 {
        XMLNode * root;
        if ((root = global.root())) {
-               XMLProperty * prop;
+               XMLProperty const * prop;
                if ((prop = root->property ("id"))) {
                        set_id (prop->value());
                }
@@ -66,7 +66,7 @@ ExportPreset::set_name (string const & name)
 }
 
 void
-ExportPreset::set_id (string id)
+ExportPreset::set_id (string const & id)
 {
        _id = id;
 
@@ -103,7 +103,7 @@ void
 ExportPreset::save (std::string const & filename)
 {
        save_instant_xml ();
-        
+
        if (global.root()) {
                 global.set_filename (filename);
                global.write ();
@@ -124,7 +124,7 @@ ExportPreset::get_instant_xml () const
        if ((instant_xml = session.instant_xml ("ExportPresets"))) {
                XMLNodeList children = instant_xml->children ("ExportPreset");
                for (XMLNodeList::iterator it = children.begin(); it != children.end(); ++it) {
-                       XMLProperty * prop;
+                       XMLProperty const * prop;
                        if ((prop = (*it)->property ("id")) && _id == PBD::UUID(prop->value())) {
                                return *it;
                        }