do nothing gracefully if asked to remove only tempo
This commit is contained in:
parent
dc74decdf7
commit
db3e87a7e4
@ -990,11 +990,13 @@ TempoMap::add_tempo (TempoPoint * tp)
|
|||||||
void
|
void
|
||||||
TempoMap::remove_tempo (TempoPoint const & tp)
|
TempoMap::remove_tempo (TempoPoint const & tp)
|
||||||
{
|
{
|
||||||
|
if (_tempos.size() < 2) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
superclock_t sc (tp.sclock());
|
superclock_t sc (tp.sclock());
|
||||||
Tempos::iterator t;
|
Tempos::iterator t;
|
||||||
|
|
||||||
assert (_tempos.size() > 1);
|
|
||||||
|
|
||||||
/* the argument is likely to be a Point-derived object that doesn't
|
/* the argument is likely to be a Point-derived object that doesn't
|
||||||
* actually exist in this TempoMap, since the caller called
|
* actually exist in this TempoMap, since the caller called
|
||||||
* TempoMap::write_copy() in order to perform an RCU operation, but
|
* 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
|
void
|
||||||
TempoMap::remove_meter (MeterPoint const & mp)
|
TempoMap::remove_meter (MeterPoint const & mp)
|
||||||
{
|
{
|
||||||
|
if (_meters.size() < 2) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
superclock_t sc = mp.sclock();
|
superclock_t sc = mp.sclock();
|
||||||
Meters::iterator m;
|
Meters::iterator m;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user