diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2019-07-09 17:22:52 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2019-07-09 18:39:02 +0300 |
commit | 817e2796cbe4c6e115c8a4b6bf535017043be930 (patch) | |
tree | 2021bb4014c671fa9fd752bbbbad793b00e1cfc0 /source/blender | |
parent | 6510ab86764042280787686d35c33caecf47b5ae (diff) |
Fix T52814 and T58686: Alembic crashing on fluid sim export
The velocities std::vector was allocated in too narrow a scope, causing
use-after-free errors.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/alembic/intern/abc_mesh.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/alembic/intern/abc_mesh.cc b/source/blender/alembic/intern/abc_mesh.cc index 7f7afe0ce5e..0ff3360d644 100644 --- a/source/blender/alembic/intern/abc_mesh.cc +++ b/source/blender/alembic/intern/abc_mesh.cc @@ -409,6 +409,7 @@ void AbcGenericMeshWriter::writeMesh(struct Mesh *mesh) { std::vector<Imath::V3f> points, normals; std::vector<int32_t> poly_verts, loop_counts; + std::vector<Imath::V3f> velocities; bool smooth_normal = false; @@ -458,9 +459,7 @@ void AbcGenericMeshWriter::writeMesh(struct Mesh *mesh) } if (m_is_liquid) { - std::vector<Imath::V3f> velocities; getVelocities(mesh, velocities); - m_mesh_sample.setVelocities(V3fArraySample(velocities)); } |