From 28e09980a2d09eaea3f49cb080265014a4f1c2f4 Mon Sep 17 00:00:00 2001 From: Pratik Borhade Date: Tue, 4 Oct 2022 20:49:34 +0530 Subject: 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 --- source/blender/editors/space_outliner/outliner_tools.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc index 847b9e0963b..dfb421367c1 100644 --- a/source/blender/editors/space_outliner/outliner_tools.cc +++ b/source/blender/editors/space_outliner/outliner_tools.cc @@ -2351,7 +2351,7 @@ static TreeTraversalAction outliner_find_objects_to_delete(TreeElement *te, void /* 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); -- cgit v1.2.3