diff options
Diffstat (limited to 'libs/evoral/evoral')
-rw-r--r-- | libs/evoral/evoral/EventRingBuffer.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/evoral/evoral/EventRingBuffer.hpp b/libs/evoral/evoral/EventRingBuffer.hpp index 8fec622243..419f427f33 100644 --- a/libs/evoral/evoral/EventRingBuffer.hpp +++ b/libs/evoral/evoral/EventRingBuffer.hpp @@ -116,7 +116,7 @@ template<typename Time> inline uint32_t EventRingBuffer<Time>::write(Time time, EventType type, uint32_t size, const uint8_t* buf) { - if (write_space() < (sizeof(Time) + sizeof(EventType) + sizeof(uint32_t) + size)) { + if (!buf || write_space() < (sizeof(Time) + sizeof(EventType) + sizeof(uint32_t) + size)) { return 0; } else { PBD::RingBufferNPT<uint8_t>::write ((uint8_t*)&time, sizeof(Time)); |