[Bf-blender-cvs] [bf0ac873ba1] blender2.8: Fix crash loading files where outliner treestore isn't set

Campbell Barton noreply at git.blender.org
Wed May 3 10:07:32 CEST 2017


Commit: bf0ac873ba13996756f0b553c41ea36097a6dec3
Author: Campbell Barton
Date:   Wed May 3 18:10:18 2017 +1000
Branches: blender2.8
https://developer.blender.org/rBbf0ac873ba13996756f0b553c41ea36097a6dec3

Fix crash loading files where outliner treestore isn't set

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

M	source/blender/blenloader/intern/versioning_280.c

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

diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 58724459a45..476439dfe77 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -193,6 +193,11 @@ void do_versions_after_linking_280(Main *main)
 						soutliner->outlinevis = SO_ACT_LAYER;
 
 						if (BLI_listbase_count_ex(&layer->layer_collections, 2) == 1) {
+							if (soutliner->treestore == NULL) {
+								soutliner->treestore = BLI_mempool_create(
+								        sizeof(TreeStoreElem), 1, 512, BLI_MEMPOOL_ALLOW_ITER);
+							}
+
 							/* Create a tree store element for the collection. This is normally
 							 * done in check_persistent (outliner_tree.c), but we need to access
 							 * it here :/ (expand element if it's the only one) */




More information about the Bf-blender-cvs mailing list