Fix: Incorrect creation of deform mesh with no deform modifiers

Logic error in 99c630cd9c, hidden by a null check
in `BKE_id_copy_ex`.
This commit is contained in:
Hans Goudey
2023-04-12 15:42:14 -04:00
parent 16de3ba759
commit a04098ebba

View File

@@ -699,7 +699,12 @@ static void mesh_calc_modifiers(struct Depsgraph *depsgraph,
* places that wish to use the original mesh but with deformed
* coordinates (like vertex paint). */
if (r_deform) {
mesh_deform = BKE_mesh_copy_for_eval(mesh_final, false);
if (mesh_final) {
mesh_deform = BKE_mesh_copy_for_eval(mesh_final, false);
}
else {
mesh_deform = BKE_mesh_copy_for_eval(mesh_input, false);
}
}
}