13
0

don't abort when loading legacy xfades if the constituent regions cannot be found

git-svn-id: svn://localhost/ardour2/branches/3.0@12495 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-05-30 16:16:27 +00:00
parent ddc513c38d
commit 71dd60c736

View File

@ -675,17 +675,25 @@ AudioPlaylist::set_state (const XMLNode& node, int version)
p = (*i)->property (X_("in")); p = (*i)->property (X_("in"));
assert (p); assert (p);
cerr << "Looking for in xfade region " << p->value() << endl;
boost::shared_ptr<Region> in = region_by_id (PBD::ID (p->value ())); boost::shared_ptr<Region> in = region_by_id (PBD::ID (p->value ()));
assert (in); if (!in) {
warning << string_compose (_("Legacy crossfade involved an incoming region not present in playlist \"%1\" - crossfade discarded"),
name())
<< endmsg;
continue;
}
boost::shared_ptr<AudioRegion> in_a = boost::dynamic_pointer_cast<AudioRegion> (in); boost::shared_ptr<AudioRegion> in_a = boost::dynamic_pointer_cast<AudioRegion> (in);
assert (in_a); assert (in_a);
p = (*i)->property (X_("out")); p = (*i)->property (X_("out"));
assert (p); assert (p);
cerr << "Looking for out xfade region " << p->value() << endl;
boost::shared_ptr<Region> out = region_by_id (PBD::ID (p->value ())); boost::shared_ptr<Region> out = region_by_id (PBD::ID (p->value ()));
assert (out); if (!in) {
warning << string_compose (_("Legacy crossfade involved an outgoing region not present in playlist \"%1\" - crossfade discarded"),
name())
<< endmsg;
continue;
}
boost::shared_ptr<AudioRegion> out_a = boost::dynamic_pointer_cast<AudioRegion> (out); boost::shared_ptr<AudioRegion> out_a = boost::dynamic_pointer_cast<AudioRegion> (out);
assert (out_a); assert (out_a);