mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Fixed crashes and instability when love.graphics.setMode is called when a vertex buffer is mapped by love.
This commit is contained in:
@@ -291,13 +291,11 @@ void VBO::unload(bool save)
|
||||
if (save && getMemoryBacking() == BACKING_PARTIAL)
|
||||
{
|
||||
VertexBuffer::Bind bind(*this);
|
||||
|
||||
bool mapped = is_mapped;
|
||||
|
||||
map(); // saves buffer content to memory_map.
|
||||
is_mapped = mapped;
|
||||
}
|
||||
|
||||
is_mapped = false;
|
||||
|
||||
glDeleteBuffersARB(1, &vbo);
|
||||
vbo = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user