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);