diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-07-13 13:48:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-07-13 13:50:02 +0300 |
commit | 248bba81e7a0312addaecba4626ed51f0df79161 (patch) | |
tree | d0e5d95cfcbb964705108efc3639a89d32cb3a95 /source/blender/editors/sculpt_paint/paint_image_proj.c | |
parent | e656dcd36536c0d6cf33cdd8336e73292986ae3a (diff) |
Fix texture paint crash when painting onto stencil
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_proj.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index d0f1cc99b8d..b43581170d0 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -3712,8 +3712,12 @@ static void project_paint_prepare_all_faces( } /* don't allow using the same inage for painting and stencilling */ - if (slot->ima == ps->stencil_ima) + if (slot->ima == ps->stencil_ima) { + /* While this shouldn't be used, face-winding reads all polys. + * It's less trouble to set all faces to valid UV's, avoiding NULL checks all over. */ + ps->dm_mloopuv[lt->poly] = mloopuv_base; continue; + } tpage = slot->ima; } |