[Bf-blender-cvs] [4186b0ebe4e] master: Fix T101233: Crash on deleting the object in outliner due to null pointer access

Pratik Borhade noreply at git.blender.org
Tue Oct 4 17:22:31 CEST 2022


Commit: 4186b0ebe4e86eb4de5e88dd333ea3884748173c
Author: Pratik Borhade
Date:   Tue Oct 4 20:49:34 2022 +0530
Branches: master
https://developer.blender.org/rB4186b0ebe4e86eb4de5e88dd333ea3884748173c

Fix T101233: Crash on deleting the object in outliner due to null pointer access

After rB188f7585a183 deleting the object results in crash due
to null pointer access if collections are filtered out

Reviewed by: mont29

Differential Revision: https://developer.blender.org/D16031

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

M	source/blender/editors/space_outliner/outliner_tools.cc

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

diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc
index 16b24b14845..6679489af60 100644
--- a/source/blender/editors/space_outliner/outliner_tools.cc
+++ b/source/blender/editors/space_outliner/outliner_tools.cc
@@ -2371,7 +2371,7 @@ static TreeTraversalAction outliner_collect_objects_to_delete(TreeElement *te, v
 
   /* Do not allow to delete children objects of an override collection. */
   TreeElement *te_parent = te->parent;
-  if (outliner_is_collection_tree_element(te_parent)) {
+  if (te_parent != nullptr && outliner_is_collection_tree_element(te_parent)) {
     TreeStoreElem *tselem_parent = TREESTORE(te_parent);
     ID *id_parent = tselem_parent->id;
     BLI_assert(GS(id_parent->name) == ID_GR);



More information about the Bf-blender-cvs mailing list