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:
authorPhilipp Oeser <info@graphics-engineer.com>2021-11-26 12:00:09 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-11-26 16:24:46 +0300
commit35c3644e78d37c2413f6a239348fb5ff7d59a647 (patch)
tree062e156067e3d657e66fc7801884e061e5125b5a /source/blender/editors/sculpt_paint/paint_image_proj.c
parent63342861e7c113010808b918c68ad4de87d496f3 (diff)
Fix T93117: Texture paint clone tool crash in certain situation
Caused by {rBaf162658e127}, so long standing bug. When changing clone slots (report involved a quite complicated sequence of selecting textures and undo -- but I think this could happen in more situations) code checks for UV of new clone slot. However, since above commit the slot and the clone slot were mixed up, so in this case the responsible NULL check (for when no UV is assigned) wasnt working. Now correct this (NULL check the clone slot uv -- instead of the paint slot UV). note: not sure why low level CustomData functions actually dont do the name NULL checks themselves (seems like callers are always responsible). Maniphest Tasks: T93117 Differential Revision: https://developer.blender.org/D13378
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_proj.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index db3e69b0953..33166988f7d 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4134,8 +4134,9 @@ static bool project_paint_clone_face_skip(ProjPaintState *ps,
if (ps->do_material_slots) {
if (lc->slot_clone != lc->slot_last_clone) {
- if (!slot->uvname || !(lc->mloopuv_clone_base = CustomData_get_layer_named(
- &ps->me_eval->ldata, CD_MLOOPUV, lc->slot_clone->uvname))) {
+ if (!lc->slot_clone->uvname ||
+ !(lc->mloopuv_clone_base = CustomData_get_layer_named(
+ &ps->me_eval->ldata, CD_MLOOPUV, lc->slot_clone->uvname))) {
lc->mloopuv_clone_base = CustomData_get_layer(&ps->me_eval->ldata, CD_MLOOPUV);
}
lc->slot_last_clone = lc->slot_clone;