diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-15 13:23:59 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-15 13:43:12 +0300 |
commit | 156fe74f914e720297a7c444b7df9568eeaaa09f (patch) | |
tree | b1d86e629b1cda8a0573b3814578958ad91ac70a /source | |
parent | 4a3a4eef14eaf760c09e004b33e675dc3682fab8 (diff) |
Depsgraph: Fix/workaround crash after recent point cache changes
For some reason relations can not always be found. This is to be
investigated, but doesn't hurt to be safe here. Also allows to
unlock production.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_build.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc index 64adfa1ceea..d56c47a0d2a 100644 --- a/source/blender/depsgraph/intern/depsgraph_build.cc +++ b/source/blender/depsgraph/intern/depsgraph_build.cc @@ -191,7 +191,15 @@ void DEG_add_object_pointcache_relation(struct DepsNodeHandle *node_handle, DEG::ComponentKey point_cache_key(id, DEG::DEG_NODE_TYPE_POINT_CACHE); DEG::DepsRelation *rel = relation_builder->add_relation( comp_key, point_cache_key, "Point Cache"); - rel->flag |= DEG::DEPSREL_FLAG_FLUSH_USER_EDIT_ONLY; + if (rel != NULL) { + rel->flag |= DEG::DEPSREL_FLAG_FLUSH_USER_EDIT_ONLY; + } + else { + fprintf(stderr, + "Error in point cache relation from %s to ^%s.\n", + object->id.name, + id->name); + } } void DEG_add_special_eval_flag(struct DepsNodeHandle *node_handle, |