From 984a78e76385a3dc02a956ea903754fdb177bd97 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 20 Jun 2018 13:42:23 +0200 Subject: [PATCH] Fix crash opening some files, after recent changes. --- .../intern/builder/deg_builder_relations.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index e728ae787c2..d0b699d34e4 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -469,11 +469,13 @@ void DepsgraphRelationBuilder::build_collection( DEG_OPCODE_TRANSFORM_LOCAL); if (!group_done) { LISTBASE_FOREACH (CollectionObject *, cob, &collection->gobject) { - const int restrict_flag = (graph_->mode == DAG_EVAL_VIEWPORT) - ? OB_RESTRICT_VIEW - : OB_RESTRICT_RENDER; - if (cob->ob->restrictflag & restrict_flag) { - continue; + if (allow_restrict_flags) { + const int restrict_flag = (graph_->mode == DAG_EVAL_VIEWPORT) + ? OB_RESTRICT_VIEW + : OB_RESTRICT_RENDER; + if (cob->ob->restrictflag & restrict_flag) { + continue; + } } build_object(NULL, cob->ob); }