[Bf-blender-cvs] [78872b33600] blender-v2.82-release: Fix T73499: Crash on hiding parent and all children of an object if one child is in an excluded collection

Philipp Oeser noreply at git.blender.org
Thu Jan 30 11:14:36 CET 2020


Commit: 78872b33600ed68ca1aa5295b5c9df3cc79a1da2
Author: Philipp Oeser
Date:   Thu Jan 30 10:54:58 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rB78872b33600ed68ca1aa5295b5c9df3cc79a1da2

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

===================================================================

M	source/blender/editors/space_outliner/outliner_draw.c

===================================================================

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



More information about the Bf-blender-cvs mailing list