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
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-11-21 17:47:47 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-11-21 17:47:47 +0300
commita80b74ab0decc95f4e6ca69c7af60f8a28868645 (patch)
tree6d785106acccdc1a3385b09358afdb1471a69af9 /source/blender/depsgraph
parent83b3e3fe0045004bdaaa034f533ef74fc7284994 (diff)
Depsgraph: Fix warning with Empty objects
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index e028a81d423..6a9023b5b6a 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -2092,10 +2092,15 @@ void DepsgraphRelationBuilder::build_copy_on_write_relations(IDDepsNode *id_node
if (GS(id_orig->name) == ID_OB) {
Object *object = (Object *)id_orig;
ID *object_data_id = (ID *)object->data;
- OperationKey data_copy_on_write_key(object_data_id,
- DEG_NODE_TYPE_COPY_ON_WRITE,
- DEG_OPCODE_COPY_ON_WRITE);
- add_relation(data_copy_on_write_key, copy_on_write_key, "Eval Order");
+ if (object_data_id != NULL) {
+ OperationKey data_copy_on_write_key(object_data_id,
+ DEG_NODE_TYPE_COPY_ON_WRITE,
+ DEG_OPCODE_COPY_ON_WRITE);
+ add_relation(data_copy_on_write_key, copy_on_write_key, "Eval Order");
+ }
+ else {
+ BLI_assert(object->type == OB_EMPTY);
+ }
}
}