13
0

fix logic for setting state of tempo map from XML

We are using RCU for the tempo map so ... we need to use it
This commit is contained in:
Paul Davis 2020-12-19 18:30:49 -07:00
parent fa67e07d87
commit d1c695a1a6

View File

@ -1564,8 +1564,9 @@ Session::set_state (const XMLNode& node, int version)
goto out;
} else {
try {
TempoMap::SharedPtr new_map (new TempoMap (*child, version));
TempoMap::update (new_map);
TempoMap::SharedPtr tmap = TempoMap::write_copy (); /* get writable copy of current tempo map */
tmap->set_state (*child, version); /* reset its state */
TempoMap::update (tmap); /* update the global tempo map manager */
} catch (...) {
goto out;
}