diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-04-01 13:28:26 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-04-01 13:28:26 +0300 |
commit | 64538532d44d35c109dc4c82e11c4e173f5f29a3 (patch) | |
tree | 5204f343a8a9e069b343fc5b243845682a7a0fa1 /source/blender/blenkernel | |
parent | d904271d09f32e09b74f2038ecd13ac244855a31 (diff) |
Fix T87056: Segfault in GPU_batch_clear() involing Lattice evaluation
Fix a segfault by setting the `batch_cache` pointer to `NULL` when copying
a Lattice. That way the copy can get its own batch cache when needed,
preventing a use-after-free.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/lattice.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index 48104e72825..1357424d5ff 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -94,6 +94,7 @@ static void lattice_copy_data(Main *bmain, ID *id_dst, const ID *id_src, const i } lattice_dst->editlatt = NULL; + lattice_dst->batch_cache = NULL; } static void lattice_free_data(ID *id) |