diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-10-18 15:17:45 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-10-18 15:18:04 +0400 |
commit | 3a961d66ef189f70cfcd16338b4dc14b82d6bb00 (patch) | |
tree | 4bf5d397506daeae9fb5bdec391598f16655ea27 /source/blender | |
parent | 61a330baca0ff9bb3cf477c04f539ef276a0356f (diff) |
Fix T42281, crash in subsurf with texture painting.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 0bd9517dcfd..f03e2eaff4a 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -2352,8 +2352,9 @@ static void ccgDM_drawFacesTex_common(DerivedMesh *dm, mat_nr_cache = mat_nr; } - tf = tf_base + gridOffset; - tf_stencil = tf_stencil_base + gridOffset; + + tf = tf_base ? tf_base + gridOffset : NULL; + tf_stencil = tf_stencil_base ? tf_stencil_base + gridOffset : NULL; gridOffset += gridFaces * gridFaces * numVerts; } |