Stop passing references to things that may disappear when a metric section is replaced.

This commit is contained in:
nick_m 2016-07-04 01:12:55 +10:00
parent 828cb52f86
commit 0bdbe56cf1
4 changed files with 41 additions and 16 deletions

View file

@ -6557,7 +6557,8 @@ Editor::define_one_bar (framepos_t start, framepos_t end)
} else if (t.frame() == start) {
_session->tempo_map().change_existing_tempo_at (start, beats_per_minute, t.note_type());
} else {
_session->tempo_map().add_tempo (Tempo (beats_per_minute, t.note_type()), 0.0, start, TempoSection::Constant, AudioTime);
const Tempo tempo (beats_per_minute, t.note_type());
_session->tempo_map().add_tempo (tempo, 0.0, start, TempoSection::Constant, AudioTime);
}
XMLNode& after (_session->tempo_map().get_state());