diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-05-03 11:10:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-05-03 11:13:09 +0300 |
commit | bf0ac873ba13996756f0b553c41ea36097a6dec3 (patch) | |
tree | c652c076c2a2968697d3c5b1421457b9f928947b /source | |
parent | d116932f3a6cf081cd55aba11b4baf32b998a4d2 (diff) |
Fix crash loading files where outliner treestore isn't set
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 5 |
1 files changed, 5 insertions, 0 deletions
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) */ |