[Bf-blender-cvs] [a5783d08f9d] blender2.8: Resolve assert in weight paint mode w/ no weights

Campbell Barton noreply at git.blender.org
Thu Jun 1 05:37:21 CEST 2017


Commit: a5783d08f9d859260afc46ea0c86e91972b36efa
Author: Campbell Barton
Date:   Thu Jun 1 13:35:27 2017 +1000
Branches: blender2.8
https://developer.blender.org/rBa5783d08f9d859260afc46ea0c86e91972b36efa

Resolve assert in weight paint mode w/ no weights

===================================================================

M	source/blender/draw/intern/draw_cache_impl_mesh.c

===================================================================

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);




More information about the Bf-blender-cvs mailing list