X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fexport_preset.cc;h=dec4c4b79a63200753444e39c4788b0ee4d06cd5;hb=97020209296453f02590cce82b6160ce122aad08;hp=92fcb9e5a7acc6e6cf6ed827dca22ecfc1d60219;hpb=bb9cc45cd22af67ac275a5e73accbe14fee664d8;p=ardour.git diff --git a/libs/ardour/export_preset.cc b/libs/ardour/export_preset.cc index 92fcb9e5a7..dec4c4b79a 100644 --- a/libs/ardour/export_preset.cc +++ b/libs/ardour/export_preset.cc @@ -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()); } @@ -103,8 +103,9 @@ void ExportPreset::save (std::string const & filename) { save_instant_xml (); + if (global.root()) { - global.set_filename (filename); + global.set_filename (filename); global.write (); } } @@ -123,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; }