[Bf-blender-cvs] [54832f1] hair_immediate_fixes: Fix for crash when going into particle edit mode with baked hair simulation.

Lukas Tönne noreply at git.blender.org
Mon Sep 1 18:49:25 CEST 2014


Commit: 54832f1a1946c1dfd08cecc6394d82d2c6b9f6ff
Author: Lukas Tönne
Date:   Mon Sep 1 18:47:27 2014 +0200
Branches: hair_immediate_fixes
https://developer.blender.org/rB54832f1a1946c1dfd08cecc6394d82d2c6b9f6ff

Fix for crash when going into particle edit mode with baked hair
simulation.

Note that this currently generates an extreme amount of points, by
making a edit pathcache curve for each hair in every frame! But at least
doesn't simply crash now.

===================================================================

M	source/blender/blenkernel/intern/particle.c

===================================================================

diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 27d346f..fd71529 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -2545,7 +2545,7 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
 	ParticleSystem *psys = ctx->sim.psys;
 	ParticleSettings *part = psys->part;
 	ParticleCacheKey **cache = psys->childcache;
-	ParticleCacheKey **pcache = psys_in_edit_mode(ctx->sim.scene, psys) ? psys->edit->pathcache : psys->pathcache;
+	ParticleCacheKey **pcache = psys_in_edit_mode(ctx->sim.scene, psys) && psys->edit ? psys->edit->pathcache : psys->pathcache;
 	ParticleCacheKey *child, *par = NULL, *key[4];
 	ParticleTexture ptex;
 	float *cpa_fuv = 0, *par_rot = 0, rot[4];




More information about the Bf-blender-cvs mailing list