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:
authorJanne Karhu <jhkarh@gmail.com>2011-03-16 16:03:05 +0300
committerJanne Karhu <jhkarh@gmail.com>2011-03-16 16:03:05 +0300
commit8b9615caa08e7af278000bbce782be5c09cd70a5 (patch)
tree92c38964e3b1557f857af176ca7e9543d2687de9
parentc32ca47c6fbd7c94382bc2511dfba547f39a35c7 (diff)
Fix for [#26516] Blender crashes for Particle Physics Path Editing.
* Silly own mistake from some previous code cleanup.
-rw-r--r--source/blender/blenkernel/intern/particle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index fcea0ffb6cf..f937d7265aa 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -1211,7 +1211,7 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData
PTCacheEditPoint *point = pind->epoint;
ParticleKey keys[4];
int point_vel = (point && point->keys->vel);
- float real_t, dfra, keytime, invdt;
+ float real_t, dfra, keytime, invdt = 1.f;
/* billboards wont fill in all of these, so start cleared */
memset(keys, 0, sizeof(keys));
@@ -1350,10 +1350,10 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData
dfra = keys[2].time - keys[1].time;
keytime = (real_t - keys[1].time) / dfra;
- invdt = dfra * 0.04f * psys->part->timetweak;
/* convert velocity to timestep size */
if(pind->keyed || pind->cache || point_vel){
+ invdt = dfra * 0.04f * (psys ? psys->part->timetweak : 1.f);
mul_v3_fl(keys[1].vel, invdt);
mul_v3_fl(keys[2].vel, invdt);
interp_qt_qtqt(result->rot,keys[1].rot,keys[2].rot,keytime);