mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Don't free StreamWriter buffer until after callbacks
* Some callbacks may want to process the data so we can't free it out from under them.
This commit is contained in:
@@ -771,8 +771,6 @@ StreamWriter::StreamWriter(Compressor *compressor, Ownership own)
|
||||
|
||||
StreamWriter::~StreamWriter()
|
||||
{
|
||||
FreeAlignedBuffer(m_BufferBase);
|
||||
|
||||
if(m_Ownership == Ownership::Stream)
|
||||
{
|
||||
if(m_File)
|
||||
@@ -789,6 +787,8 @@ StreamWriter::~StreamWriter()
|
||||
|
||||
for(StreamCloseCallback cb : m_Callbacks)
|
||||
cb();
|
||||
|
||||
FreeAlignedBuffer(m_BufferBase);
|
||||
}
|
||||
|
||||
bool StreamWriter::SendSocketData(const void *data, uint64_t numBytes)
|
||||
|
||||
Reference in New Issue
Block a user