fix incorrect code that passed a null boost::shared_ptr<AudioRegion> into a ::get_state() call

This commit is contained in:
Paul Davis 2022-01-20 12:07:59 -07:00
parent 46e2a03863
commit 4c9460b697
1 changed files with 2 additions and 2 deletions

View File

@ -1419,10 +1419,10 @@ Session::state (bool save_template, snapshot_t snapshot_type, bool only_used_ass
ca->add_child_nocopy (*can);
/* see above, child is still "Regions" here */
if (i->second->playlist() == 0 && only_used_assets) {
if (boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion>( i->second)) {
if (boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion> (i->second)) {
child->add_child_nocopy (ar->get_basic_state ());
} else {
child->add_child_nocopy (ar->get_state ());
child->add_child_nocopy (i->second->get_state ());
}
}
}