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.
This commit is contained in:
parent
d904271d09
commit
64538532d4
Notes:
blender-bot
2023-02-14 09:19:09 +01:00
Referenced by issue #87056, Segfault in GPU_batch_clear() involing Lattice evaluation
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue