Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-06-26 13:23:17 +0300
committerJulian Eisel <julian@blender.org>2020-06-26 13:30:59 +0300
commit2a72421cfb38d9a4a19a473184ba28b8ef8851e4 (patch)
treecd613f16add956726ef2b06676551caaa1d6eeda /source/blender/editors/space_outliner/outliner_tree.c
parent2036b9771e5b2cbc7490cfb3c572c8329bf0bf73 (diff)
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.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tree.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index f07bb800eca..bc272431e3a 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -2356,8 +2356,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;