diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-11-14 14:08:41 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-11-14 14:08:57 +0300 |
commit | 4b7fc26baed8389ecb9d0d350229b9b64ce47d03 (patch) | |
tree | 3037d393e2d1e543ebba9ff7cab34988c9dc5926 /source/blender/blenkernel | |
parent | 60ffc08547476781f9b3f61c344af13fbad13ec5 (diff) |
Don't assign wrong datalayers to gpuattribs in edit mode.
layer index was being obtained for loop data types but we referenced
Tessface data types
NULLing those out since only the data offsets are used in edit mode and
address sanitizer complains about freed memory access.
Also minor comment in texpainting
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 81c03d8081b..6276277be28 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -2960,7 +2960,7 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs, a = attribs->tottface++; if (layer != -1) { - attribs->tface[a].array = tfdata->layers[layer].data; + attribs->tface[a].array = NULL; attribs->tface[a].em_offset = ldata->layers[layer].offset; } else { @@ -3007,7 +3007,7 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs, a = attribs->totmcol++; if (layer != -1) { - attribs->mcol[a].array = tfdata->layers[layer].data; + attribs->mcol[a].array = NULL; /* odd, store the offset for a different layer type here, but editmode draw code expects it */ attribs->mcol[a].em_offset = ldata->layers[layer].offset; } |