diff options
Diffstat (limited to 'source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_pos.cc')
-rw-r--r-- | source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_pos.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_pos.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_pos.cc index c2b4d389b7c..1671a1cd1e7 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_pos.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_pos.cc @@ -110,8 +110,11 @@ static void extract_fdots_init_subdiv(const DRWSubdivCache *subdiv_cache, GPUVertBuf *fdots_nor_vbo = cache->final.buff.vbo.fdots_nor; GPUIndexBuf *fdots_pos_ibo = cache->final.buff.ibo.fdots; - GPU_vertbuf_init_build_on_device( - fdots_nor_vbo, get_fdots_nor_format_subdiv(), subdiv_cache->num_coarse_poly); + /* The normals may not be requested. */ + if (fdots_nor_vbo) { + GPU_vertbuf_init_build_on_device( + fdots_nor_vbo, get_fdots_nor_format_subdiv(), subdiv_cache->num_coarse_poly); + } GPU_vertbuf_init_build_on_device( fdots_pos_vbo, get_fdots_pos_format(), subdiv_cache->num_coarse_poly); GPU_indexbuf_init_build_on_device(fdots_pos_ibo, subdiv_cache->num_coarse_poly); |