Skip to content

Commit ccfb30e

Browse files
authored
fix: m_DeviceBuffer not being zeroed on destruction for StreamBuffers (#1992)
1 parent 756cbb9 commit ccfb30e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Layers/xrRenderGL/glBufferUtils.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ void VertexStreamBuffer::Destroy()
386386
return;
387387

388388
glDeleteBuffers(1, &m_DeviceBuffer);
389+
m_DeviceBuffer = 0;
389390
}
390391

391392
void* VertexStreamBuffer::Map(size_t offset, size_t size, bool flush /*= false*/)
@@ -434,6 +435,7 @@ void IndexStreamBuffer::Destroy()
434435
return;
435436

436437
glDeleteBuffers(1, &m_DeviceBuffer);
438+
m_DeviceBuffer = 0;
437439
}
438440

439441
void* IndexStreamBuffer::Map(size_t offset, size_t size, bool flush /*= false*/)

0 commit comments

Comments
 (0)