Fix (unreported) crash in some mesh-from-object code.

Crashed e.g. FBX exporter.

Mistake in rB0c33e84020deca.
This commit is contained in:
Bastien Montagne 2022-03-28 09:53:17 +02:00
parent af1341322f
commit 587efa9949
Notes: blender-bot 2023-02-14 09:34:18 +01:00
Referenced by issue #96796, Segmentation fault when converted to mesh via API
1 changed files with 1 additions and 1 deletions

View File

@ -1068,7 +1068,7 @@ static Mesh *mesh_new_from_mesh_object_with_layers(Depsgraph *depsgraph,
}
Object object_for_eval;
blender::dna::zero_memory(object_for_eval);
blender::dna::copy_memory(object_for_eval, *object);
if (object_for_eval.runtime.data_orig != nullptr) {
object_for_eval.data = object_for_eval.runtime.data_orig;
}