Fix index out of bounds

This commit is contained in:
James Seibel
2023-10-27 20:01:44 -05:00
parent 2cd1dc6e92
commit ca425eae6d
@@ -198,7 +198,6 @@ public class ColumnRenderBuffer extends AbstractRenderBuffer
{
throw new RuntimeException("Too many vertex buffers!!");
}
vboIndex++;
// get or create the VBO
@@ -219,7 +218,7 @@ public class ColumnRenderBuffer extends AbstractRenderBuffer
}
catch (Exception e)
{
vbos[vboIndex - 1] = null;
vbos[vboIndex] = null;
vbo.close();
LOGGER.error("Failed to upload buffer: ", e);
}
@@ -241,6 +240,8 @@ public class ColumnRenderBuffer extends AbstractRenderBuffer
remainingMS = 0;
}
}
vboIndex++;
}
if (vboIndex < vbos.length)