13
0

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

View File

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