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:
authorCampbell Barton <ideasman42@gmail.com>2017-06-01 06:35:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-06-01 06:37:18 +0300
commita5783d08f9d859260afc46ea0c86e91972b36efa (patch)
tree15d44fefdc0f4fa83c06e6f00e1af23b36ff7572
parent390648b98473851c5cdff88aca5ba72aa57151e4 (diff)
Resolve assert in weight paint mode w/ no weights
-rw-r--r--source/blender/draw/intern/draw_cache_impl_mesh.c4
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);