Commit: 156fe74f914e720297a7c444b7df9568eeaaa09f
Author: Sergey Sharybin
Date:   Thu Nov 15 11:23:59 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB156fe74f914e720297a7c444b7df9568eeaaa09f

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.

===================================================================

M       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,

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to