mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
RegionFx: don't crash if plugin is missing on session load
This commit is contained in:
parent
6de2d8f5c4
commit
09a3c325ec
1 changed files with 5 additions and 1 deletions
|
|
@ -1584,7 +1584,11 @@ Region::_set_state (const XMLNode& node, int version, PropertyChange& what_chang
|
||||||
for (auto const& child : node.children ()) {
|
for (auto const& child : node.children ()) {
|
||||||
if (child->name() == X_("RegionFXPlugin")) {
|
if (child->name() == X_("RegionFXPlugin")) {
|
||||||
std::shared_ptr<RegionFxPlugin> rfx (new RegionFxPlugin (_session, time_domain ()));
|
std::shared_ptr<RegionFxPlugin> rfx (new RegionFxPlugin (_session, time_domain ()));
|
||||||
rfx->set_state (*child, version);
|
if (rfx->set_state (*child, version)) {
|
||||||
|
PBD::warning << string_compose (_("Failed to load RegionFx Plugin for region `%1'"), name()) << endmsg;
|
||||||
|
// TODO replace w/stub, retain config
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!_add_plugin (rfx, std::shared_ptr<RegionFxPlugin>(), true)) {
|
if (!_add_plugin (rfx, std::shared_ptr<RegionFxPlugin>(), true)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue