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>2015-09-25 16:51:33 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-09-25 16:53:14 +0300
commitcf12e51eba8cb45e3c19f9f069725ed2d7624b8d (patch)
tree002f101a9260f18c9369f171a7cdc040501bb9da /source/blender/blenkernel/intern/boids.c
parenta4a6e9b3f556e92f30e0e80f060427060b234859 (diff)
Fix T46249: Boid goal object that has a force field set to 'Every Point' shape causes crash.
This is a mere bandage, that whole area is known broken anyway, but at least it should prevent the crash. Note that that kind of stuff (the efd->index being a pointer) is really bad practice imho... Should be backported to final 2.76.
Diffstat (limited to 'source/blender/blenkernel/intern/boids.c')
-rw-r--r--source/blender/blenkernel/intern/boids.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
index d765dff132f..64b9bf48c98 100644
--- a/source/blender/blenkernel/intern/boids.c
+++ b/source/blender/blenkernel/intern/boids.c
@@ -80,6 +80,9 @@ static int rule_goal_avoid(BoidRule *rule, BoidBrainData *bbd, BoidValues *val,
float priority = 0.0f, len = 0.0f;
int ret = 0;
+ int p = 0;
+ efd.index = cur_efd.index = &p;
+
pd_point_from_particle(bbd->sim, pa, &pa->state, &epoint);
/* first find out goal/predator with highest priority */