diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-10-16 20:28:10 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-10-16 21:16:53 +0300 |
commit | 7e78fbf2dedfd70f8c9971ee1412183abc5a9ca7 (patch) | |
tree | 06d89352ff0e3c30e89e6f5b3014a978acbe8bc2 /source/blender/gpu | |
parent | 131ac2ec82b9e810dd6e0153009a71276b6d6f13 (diff) |
Fix assert and memleak in recent Skin Root Display patch
Caused by 4ddf3215a7df
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_batch.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_batch.c b/source/blender/gpu/intern/gpu_batch.c index fc578b4466c..168d741f92a 100644 --- a/source/blender/gpu/intern/gpu_batch.c +++ b/source/blender/gpu/intern/gpu_batch.c @@ -213,7 +213,9 @@ int GPU_batch_vertbuf_add_ex(GPUBatch *batch, GPUVertBuf *verts, bool own_vbo) if (batch->verts[v] == NULL) { #if TRUST_NO_ONE /* for now all VertexBuffers must have same vertex_len */ - assert(verts->vertex_len == batch->verts[0]->vertex_len); + if (batch->verts[0] != NULL) { + assert(verts->vertex_len == batch->verts[0]->vertex_len); + } #endif batch->verts[v] = verts; /* TODO: mark dirty so we can keep attribute bindings up-to-date */ |