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:
@@ -295,6 +295,10 @@ static void outliner_object_set_flag_recursive_cb(bContext *C,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Base *base_iter = BKE_view_layer_base_find(view_layer, ob_iter);
|
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_pointer_create(&scene->id, &RNA_ObjectBase, base_iter, &ptr);
|
||||||
}
|
}
|
||||||
RNA_property_boolean_set(&ptr, base_or_object_prop, value);
|
RNA_property_boolean_set(&ptr, base_or_object_prop, value);
|
||||||
|
Reference in New Issue
Block a user