Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-11-24 17:10:34 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-11-24 17:46:25 +0300
commit71febcbae04a24b63356740f0f8150c2cf5eb57f (patch)
tree47b7e4f9b69a582394b1afddc6ca827501d4224c /source
parenta365f1dd65763d37855b0b7ecb65a74f0b1a7be3 (diff)
Depsgraph: Make code a bit more robust against tagging indirectly linked objects
Diffstat (limited to 'source')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc19
1 files changed, 15 insertions, 4 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 2e6d5043336..82bc74fa56f 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -299,16 +299,27 @@ void id_tag_update_select_update(Depsgraph *graph, IDDepsNode *id_node)
* road.
*/
component = id_node->find_component(DEG_NODE_TYPE_LAYER_COLLECTIONS);
- node = component->find_operation(DEG_OPCODE_VIEW_LAYER_DONE);
+ BLI_assert(component != NULL);
+ if (component != NULL) {
+ node = component->find_operation(DEG_OPCODE_VIEW_LAYER_DONE);
+ }
}
else if (id_type == ID_OB) {
component = id_node->find_component(DEG_NODE_TYPE_LAYER_COLLECTIONS);
- node = component->find_operation(DEG_OPCODE_OBJECT_BASE_FLAGS);
+ /* NOTE: This component might be missing for indirectly linked
+ * objects.
+ */
+ if (component != NULL) {
+ node = component->find_operation(DEG_OPCODE_OBJECT_BASE_FLAGS);
+ }
}
else {
component = id_node->find_component(DEG_NODE_TYPE_BATCH_CACHE);
- node = component->find_operation(DEG_OPCODE_GEOMETRY_SELECT_UPDATE,
- "", -1);
+ BLI_assert(component != NULL);
+ if (component != NULL) {
+ node = component->find_operation(DEG_OPCODE_GEOMETRY_SELECT_UPDATE,
+ "", -1);
+ }
}
if (node != NULL) {
node->tag_update(graph);