twn_lines: bail on empty batch

This commit is contained in:
veclavtalica 2025-03-07 07:05:20 +03:00
parent 4a41f47a58
commit 5be4ed4645

View File

@ -83,6 +83,9 @@ void draw_line_3d(Vec3 start,
void render_lines(LinePrimitive const *line, bool is_3d) {
DeferredCommandDraw command = {0};
if (arrlenu(line->vertices) == 0)
return;
VertexBuffer buffer = get_scratch_vertex_array();
specify_vertex_buffer(buffer, line->vertices, arrlenu(line->vertices) * sizeof (*line->vertices));