mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-05 21:25:46 +01:00
Assert that nobody calls IO::copy_to_output with empty bufs
IO::copy_to_output() crashed if there was no channel to copy from. Since all callers seem to check before calling, just assert() that it is not the case.
This commit is contained in:
parent
ac923be7af
commit
d6534eb143
1 changed files with 4 additions and 2 deletions
|
|
@ -1721,12 +1721,14 @@ IO::collect_input (BufferSet& bufs, pframes_t nframes, ChanCount offset)
|
|||
void
|
||||
IO::copy_to_outputs (BufferSet& bufs, DataType type, pframes_t nframes, framecnt_t offset)
|
||||
{
|
||||
// Copy any buffers 1:1 to outputs
|
||||
|
||||
PortSet::iterator o = _ports.begin(type);
|
||||
BufferSet::iterator i = bufs.begin(type);
|
||||
BufferSet::iterator prev = i;
|
||||
|
||||
assert(i != bufs.end(type)); // or second loop will crash
|
||||
|
||||
// Copy any buffers 1:1 to outputs
|
||||
|
||||
while (i != bufs.end(type) && o != _ports.end (type)) {
|
||||
Buffer& port_buffer (o->get_buffer (nframes));
|
||||
port_buffer.read_from (*i, nframes, offset);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue