Kaydet (Commit) 23ae3418 authored tarafından Noel Grandin's avatar Noel Grandin

assert that we own the data before freeing it

Change-Id: I9676da22c00570cd59f2f46b04beb5f1337bbacf
Reviewed-on: https://gerrit.libreoffice.org/52887Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 3d44b720
......@@ -1866,7 +1866,12 @@ bool SvMemoryStream::ReAllocateMemory( long nDiff )
void SvMemoryStream::FreeMemory()
{
delete[] pBuf;
assert(bOwnsData);
if (bOwnsData)
{
delete[] pBuf;
pBuf = nullptr;
}
}
void* SvMemoryStream::SwitchBuffer()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment