From 156fe74f914e720297a7c444b7df9568eeaaa09f Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 15 Nov 2018 11:23:59 +0100 Subject: 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. --- source/blender/depsgraph/intern/depsgraph_build.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source/blender/depsgraph/intern/depsgraph_build.cc') 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, -- cgit v1.2.3