Fix remove_source assert()
With empty MIDI regions it can happen that the GUI still retains a reference (rec_regions)
This commit is contained in:
parent
1feb9b5e89
commit
ad5d355fb5
@ -4657,7 +4657,6 @@ Session::remove_source (std::weak_ptr<Source> src, bool drop_references)
|
||||
*/
|
||||
_history.clear();
|
||||
}
|
||||
assert (!source->used ());
|
||||
|
||||
if (source->empty ()) {
|
||||
/* No need to save when empty sources are removed.
|
||||
@ -4667,6 +4666,8 @@ Session::remove_source (std::weak_ptr<Source> src, bool drop_references)
|
||||
return;
|
||||
}
|
||||
|
||||
assert (!source->used ());
|
||||
|
||||
if (!in_cleanup () && !loading ()) {
|
||||
/* save state so we don't end up with a session file
|
||||
* referring to non-existent sources.
|
||||
|
Loading…
Reference in New Issue
Block a user