Fix T73499: Crash on hiding parent and all children of an object if one child is in an excluded collection

Dont act on a base which cannot be found in the viewlayer.
Oversight in rB41858a73111d.

Maniphest Tasks: T73499

Differential Revision: https://developer.blender.org/D6721
This commit is contained in:
Philipp Oeser 2020-01-30 10:54:58 +01:00
parent 306edb7477
commit 78872b3360
Notes: blender-bot 2023-02-14 10:29:32 +01:00
Referenced by issue #73499, Crash on hiding parent and all children of an object if one child is in an excluded collection
1 changed files with 4 additions and 0 deletions

View File

@ -295,6 +295,10 @@ static void outliner_object_set_flag_recursive_cb(bContext *C,
}
else {
Base *base_iter = BKE_view_layer_base_find(view_layer, ob_iter);
/* Child can be in a collection excluded from viewlayer. */
if (base_iter == NULL) {
continue;
}
RNA_pointer_create(&scene->id, &RNA_ObjectBase, base_iter, &ptr);
}
RNA_property_boolean_set(&ptr, base_or_object_prop, value);