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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-21 18:47:04 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-21 18:47:04 +0300
commit06099f391e18365da2c81fce52faa903ef44908f (patch)
tree8302467c64e19f9b283257244cdbf89ba201e96b /source/blender/blenkernel/intern/particle.c
parent09779372862a1972f8c5831df5408893f0d5c284 (diff)
Fix T64414: crash deleting collection used for particle group and use count
Diffstat (limited to 'source/blender/blenkernel/intern/particle.c')
-rw-r--r--source/blender/blenkernel/intern/particle.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index c6cc72ba989..13649eaf096 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -387,8 +387,11 @@ void psys_find_group_weights(ParticleSettings *part)
/* Find object pointers based on index. If the collection is linked from
* another library linking may not have the object pointers available on
* file load, so we have to retrieve them later. See T49273. */
- const ListBase instance_collection_objects = BKE_collection_object_cache_get(
- part->instance_collection);
+ ListBase instance_collection_objects = {NULL, NULL};
+
+ if (part->instance_collection) {
+ instance_collection_objects = BKE_collection_object_cache_get(part->instance_collection);
+ }
for (ParticleDupliWeight *dw = part->instance_weights.first; dw; dw = dw->next) {
if (dw->ob == NULL) {