From 78872b33600ed68ca1aa5295b5c9df3cc79a1da2 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Thu, 30 Jan 2020 10:54:58 +0100 Subject: 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 --- source/blender/editors/space_outliner/outliner_draw.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 2c2989a284d..a341be5bf65 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -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); -- cgit v1.2.3