diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-06-01 06:35:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-06-01 06:37:18 +0300 |
commit | a5783d08f9d859260afc46ea0c86e91972b36efa (patch) | |
tree | 15d44fefdc0f4fa83c06e6f00e1af23b36ff7572 /source | |
parent | 390648b98473851c5cdff88aca5ba72aa57151e4 (diff) |
Resolve assert in weight paint mode w/ no weights
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_mesh.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c index 7c530e53ac1..aebebc92ec2 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -833,6 +833,10 @@ static void mesh_render_data_ensure_vert_weight_color(MeshRenderData *rdata, con { float (*vweight)[3] = rdata->vert_weight_color; if (vweight == NULL) { + if (defgroup == -1) { + goto fallback; + } + if (rdata->edit_bmesh) { BMesh *bm = rdata->edit_bmesh->bm; const int cd_dvert_offset = CustomData_get_offset(&bm->vdata, CD_MDEFORMVERT); |