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:
authorBrecht Van Lommel <brecht@blender.org>2020-04-22 14:54:35 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-04-22 14:59:14 +0300
commitbc83fc9c04bef0e151518e8da299243999363799 (patch)
tree9528b342b647cf14f19f538b5c207bbabf17fb59 /source/blender/draw/engines/workbench
parentb2cc2dda9c37775b04b6a9b4e07a25a51c74c693 (diff)
Fix T75981: crash in sculpt mode with mesh that used to have multiple materials
The material indices in a mesh can exceed the number of available materials slots in the object or mesh, sculpt drawing was not taking that into account.
Diffstat (limited to 'source/blender/draw/engines/workbench')
-rw-r--r--source/blender/draw/engines/workbench/workbench_engine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_engine.c b/source/blender/draw/engines/workbench/workbench_engine.c
index c6c594dc04d..f3554f32205 100644
--- a/source/blender/draw/engines/workbench/workbench_engine.c
+++ b/source/blender/draw/engines/workbench/workbench_engine.c
@@ -126,7 +126,7 @@ static void workbench_cache_sculpt_populate(WORKBENCH_PrivateData *wpd,
for (int i = 0; i < materials_len; i++) {
shgrps[i] = workbench_material_setup(wpd, ob, i + 1, color_type, NULL);
}
- DRW_shgroup_call_sculpt_with_materials(shgrps, ob, false);
+ DRW_shgroup_call_sculpt_with_materials(shgrps, materials_len, ob, false);
}
}