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:
@@ -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->editlatt = NULL;
|
||||||
|
lattice_dst->batch_cache = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lattice_free_data(ID *id)
|
static void lattice_free_data(ID *id)
|
||||||
|
|||||||
Reference in New Issue
Block a user