opengl: fix love's internal quad index buffer failing to populate

This commit is contained in:
Alex Szpakowski
2022-02-12 09:37:30 -04:00
parent 839425f661
commit c28731ea80
2 changed files with 6 additions and 4 deletions
+2 -2
View File
@@ -111,7 +111,7 @@ Buffer::~Buffer()
void *Buffer::map(MapType /*map*/, size_t offset, size_t size)
{ @autoreleasepool {
if (size == 0)
if (size == 0 || isImmutable())
return nullptr;
Range r(offset, size);
@@ -160,7 +160,7 @@ void Buffer::unmap(size_t usedoffset, size_t usedsize)
void Buffer::fill(size_t offset, size_t size, const void *data)
{ @autoreleasepool {
if (size == 0)
if (size == 0 || isImmutable())
return;
size_t buffersize = getSize();