diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-07-31 16:29:51 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-07-31 16:33:47 +0300 |
commit | 475e9003c06869df8182e7135fe9459d7309696c (patch) | |
tree | 592f6b0d15bb05be844e5ef8f15113235476be68 /source/blender/depsgraph | |
parent | ddd44315b805aab491c085e478226f916ce03176 (diff) |
Fix T55718: Blender 2.8 crashes when converting to Curve from Mesh.
We only want to care about runtime.mesh_orig if… data is indeed a Mesh! ;)
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc index 22c1167de2a..9ed50fafc3d 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc @@ -757,7 +757,7 @@ static void deg_restore_object_runtime( Mesh *mesh_orig = object->runtime.mesh_orig; object->runtime = object_runtime_backup->runtime; object->runtime.mesh_orig = mesh_orig; - if (object->runtime.mesh_eval != NULL) { + if (object->type == OB_MESH && object->runtime.mesh_eval != NULL) { if (object->id.recalc & ID_RECALC_GEOMETRY) { /* If geometry is tagged for update it means, that part of * evaluated mesh are not valid anymore. In this case we can not @@ -773,14 +773,12 @@ static void deg_restore_object_runtime( /* Do same thing as object update: override actual object data * pointer with evaluated datablock. */ - if (object->type == OB_MESH) { - object->data = mesh_eval; - /* Evaluated mesh simply copied edit_btmesh pointer from - * original mesh during update, need to make sure no dead - * pointers are left behind. - */ - mesh_eval->edit_btmesh = mesh_orig->edit_btmesh; - } + object->data = mesh_eval; + /* Evaluated mesh simply copied edit_btmesh pointer from + * original mesh during update, need to make sure no dead + * pointers are left behind. + */ + mesh_eval->edit_btmesh = mesh_orig->edit_btmesh; } } object->base_flag = object_runtime_backup->base_flag; |