diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-02-18 20:21:44 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-02-18 20:21:44 +0300 |
commit | ecdd1864d16206eb45a6c95d9fcc0808a2c0087e (patch) | |
tree | b7cbbc5c182cbad29fc61ac7f9e3145be8fe10d4 /source | |
parent | 16a290bb6fd8e9b16c10b92328ad60d451ec5e2c (diff) |
Fix (unreported) broken-by-design code in depsgraph's `deg_backup_object_runtime()`
Committing this since it does fix broken logic (previously in that
condition obdata would always be set to NULL, since
`BKE_object_runtime_reset()` is called before).
However, this has presumably been broken that way since 05/2018, so
maybe that whole condition is not needed anymore? Or NULL pointer was
working as well here?
@sergey eyes are required here I guess ;)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc | 4 |
1 files changed, 3 insertions, 1 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 7775a2b3cd2..ea48c7e1069 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 @@ -821,7 +821,9 @@ static void deg_backup_object_runtime( * Need to make sure we don't have data set to evaluated one before free * anything. */ if (mesh_eval != NULL && object->data == mesh_eval) { - object->data = object->runtime.mesh_orig; + /* XXX Is this still useful? code was broken for some times (always setting object->data to NULL), + * and did not seem to cause any issue? */ + object->data = object_runtime_backup->runtime.mesh_orig; } /* Make a backup of base flags. */ object_runtime_backup->base_flag = object->base_flag; |