Fixed crashes and instability when love.graphics.setMode is called when a vertex buffer is mapped by love.

This commit is contained in:
Alex Szpakowski
2014-07-10 16:16:00 -03:00
parent 9ab9a393d5
commit a4a075dd2e
+2 -4
View File
@@ -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;
}