Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/opengl/gl_drawlist.cc')
-rw-r--r--source/blender/gpu/opengl/gl_drawlist.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_drawlist.cc b/source/blender/gpu/opengl/gl_drawlist.cc
index b02681af892..16ea924d8dc 100644
--- a/source/blender/gpu/opengl/gl_drawlist.cc
+++ b/source/blender/gpu/opengl/gl_drawlist.cc
@@ -151,6 +151,11 @@ void GLDrawList::append(GPUBatch *batch, int i_first, int i_count)
v_count_ = batch->elem ? batch->elem->index_len : batch->verts[0]->vertex_len;
}
+ if (v_count_ == 0) {
+ /* Nothing to draw. */
+ return;
+ }
+
if (MDI_INDEXED) {
GLDrawCommandIndexed *cmd = reinterpret_cast<GLDrawCommandIndexed *>(data_ + command_offset_);
cmd->v_first = v_first_;