13
0

do nothing gracefully if asked to remove only tempo

This commit is contained in:
Paul Davis 2022-12-10 14:14:12 -07:00
parent dc74decdf7
commit db3e87a7e4

View File

@ -990,11 +990,13 @@ TempoMap::add_tempo (TempoPoint * tp)
void
TempoMap::remove_tempo (TempoPoint const & tp)
{
if (_tempos.size() < 2) {
return;
}
superclock_t sc (tp.sclock());
Tempos::iterator t;
assert (_tempos.size() > 1);
/* the argument is likely to be a Point-derived object that doesn't
* actually exist in this TempoMap, since the caller called
* TempoMap::write_copy() in order to perform an RCU operation, but
@ -1621,6 +1623,10 @@ TempoMap::set_meter (Meter const & t, BBT_Time const & bbt)
void
TempoMap::remove_meter (MeterPoint const & mp)
{
if (_meters.size() < 2) {
return;
}
superclock_t sc = mp.sclock();
Meters::iterator m;