mirror of https://github.com/bjornbytes/lovr.git
Fix 'attempt to flush unmapped buffer' when creating empty Mesh;
This commit is contained in:
parent
a3b791a7e7
commit
deb756392b
|
@ -1413,10 +1413,11 @@ static int l_lovrGraphicsNewMesh(lua_State* L) {
|
|||
lua_pop(L, 1);
|
||||
}
|
||||
}
|
||||
|
||||
lovrBufferFlush(vertexBuffer, 0, count * stride);
|
||||
lovrBufferUnmap(vertexBuffer);
|
||||
}
|
||||
|
||||
lovrBufferFlush(vertexBuffer, 0, count * stride);
|
||||
lovrBufferUnmap(vertexBuffer);
|
||||
lovrRelease(vertexBuffer, lovrBufferDestroy);
|
||||
|
||||
luax_pushtype(L, Mesh, mesh);
|
||||
|
|
Loading…
Reference in New Issue