[Bf-blender-cvs] [d0c986b7484] blender-v2.83-release: Fix error when filtering in Outliner "Blender File" mode with libraries
Julian Eisel
noreply at git.blender.org
Mon Jul 13 17:13:31 CEST 2020
Commit: d0c986b74843bce66d759e7eb0c2e2bd48f3f966
Author: Julian Eisel
Date: Fri Jun 26 12:23:17 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBd0c986b74843bce66d759e7eb0c2e2bd48f3f966
Fix error when filtering in Outliner "Blender File" mode with libraries
Steps to reproduce were:
* Load factory settings
* Link any library
* Change to "Blender File" display mode in Outliner
* Enable filtering
* -> Assert fails
This may have had further side-effects for linked IDs.
Checked with Bastien, the NULL-check seems reasonable. It was initially there
but removed in d74f9c4b7b4f.
Fine to backport.
===================================================================
M source/blender/editors/space_outliner/outliner_tree.c
===================================================================
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index b226d291188..c8299804a22 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -2332,8 +2332,10 @@ void outliner_build_tree(
for (lib = mainvar->libraries.first; lib; lib = lib->id.next) {
ten = outliner_add_library_contents(mainvar, soops, &soops->tree, lib);
- BLI_assert(ten != NULL);
- lib->id.newid = (ID *)ten;
+ /* NULL-check matters, due to filtering there may not be a new element. */
+ if (ten) {
+ lib->id.newid = (ID *)ten;
+ }
}
/* make hierarchy */
ten = soops->tree.first;
More information about the Bf-blender-cvs
mailing list