Fix segfault in CascadeWriteBuffer::getResultBuffers()

This commit is contained in:
Vitaly Baranov 2024-12-05 12:09:36 +01:00 committed by GitHub
parent 9f425ebe73
commit 2539983728
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -56,6 +56,9 @@ void CascadeWriteBuffer::nextImpl()
CascadeWriteBuffer::WriteBufferPtrs CascadeWriteBuffer::getResultBuffers()
{
if (!curr_buffer)
return {};
/// Sync position with underlying buffer before invalidating
curr_buffer->position() = position();