Fix crash opening some files, after recent changes.

This commit is contained in:
Brecht Van Lommel
2018-06-20 13:42:23 +02:00
parent 4234cddda9
commit 984a78e763

View File

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