diff options
author | Carl Hetherington <carl@carlh.net> | 2011-03-14 18:41:35 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-03-14 18:41:35 +0000 |
commit | 5dd3e39f9ef98d82afef240b29506948e038b215 (patch) | |
tree | 3716420c99a320dec650d5ec2e46b85f771bf366 /libs/ardour/audio_port.cc | |
parent | 121ef12ae71a4b6e8c3e9518d6e0ff04a7efc103 (diff) |
Fix assert failure when cycle_end is called by AudioEngine::set_session before the buffer is set up.
git-svn-id: svn://localhost/ardour2/branches/3.0@9143 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/audio_port.cc')
-rw-r--r-- | libs/ardour/audio_port.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/ardour/audio_port.cc b/libs/ardour/audio_port.cc index e01f4a89e6..987d99e25a 100644 --- a/libs/ardour/audio_port.cc +++ b/libs/ardour/audio_port.cc @@ -59,7 +59,9 @@ AudioPort::cycle_end (pframes_t nframes) /* we can't use nframes here because the current buffer capacity may be shorter than the full buffer size if we split the cycle. */ - _buffer->silence (_buffer->capacity()); + if (_buffer->capacity () > 0) { + _buffer->silence (_buffer->capacity()); + } } } |