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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-10-08 16:18:35 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-10-08 16:20:43 +0300
commit00dc0666b3fedfbb24aef0e636a3227746e465f2 (patch)
treee4bfd984654e44f37b31b9bd3e97ab4fa3b838a4 /source/blender/blenloader
parent74e0f900c54ea57a48e0c84c51dd6859cc34d248 (diff)
Fix T49608: runtime-only particle's boid->ground Object pointer was left dangling to invalid value in read code...
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 139cb84fea1..e3b06b07222 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4277,12 +4277,14 @@ static void direct_link_particlesystems(FileData *fd, ListBase *particles)
psys->flag &= ~PSYS_KEYED;
}
-
+
if (psys->particles && psys->particles->boid) {
pa = psys->particles;
pa->boid = newdataadr(fd, pa->boid);
- for (a=1, pa++; a<psys->totpart; a++, pa++)
- pa->boid = (pa-1)->boid + 1;
+ for (a = 1, pa++; a < psys->totpart; a++, pa++) {
+ pa->boid = (pa - 1)->boid + 1;
+ pa->boid->ground = NULL; /* This is purely runtime data, but still can be an issue if left dangling. */
+ }
}
else if (psys->particles) {
for (a=0, pa=psys->particles; a<psys->totpart; a++, pa++)