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:
authorJoshua Leung <aligorith@gmail.com>2007-12-17 09:32:53 +0300
committerJoshua Leung <aligorith@gmail.com>2007-12-17 09:32:53 +0300
commitde073e74d105ffe9e9ab30974e47ad530a43cefe (patch)
treef63810c96537a19b84c654769d1eb90efd31dbe9 /source/blender/blenkernel
parentca689313d2f7fe57c4347434bbce62b1b2f6ed0f (diff)
Bugfix #7918: Particles (svn) Crashing when adding particles in EditMode
This commit should fix the error. dm was used before being check if it was NULL.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/particle.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index b7ee3d96ef0..08f269852e3 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -691,12 +691,13 @@ int psys_particle_dm_face_lookup(Object *ob, DerivedMesh *dm, int index, float *
#define PARTICLE_ERROR(_nor, _vec) _vec[0]=_vec[1]=_vec[2]=0.0; if(_nor){ _nor[0]=_nor[1]=0.0; _nor[2]=1.0; }
void psys_particle_on_dm(Object *ob, DerivedMesh *dm, int from, int index, int index_dmcache, float *fw, float foffset, float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor)
{
- float (*orcodata)[3] = dm->getVertDataArray(dm, CD_ORCO);
+ float (*orcodata)[3];
if(index < 0){ /* 'no dm' error has happened! */
PARTICLE_ERROR(nor, vec);
return;
}
+ orcodata= dm->getVertDataArray(dm, CD_ORCO);
if (dm->deformedOnly || index_dmcache == DMCACHE_ISCHILD) {
/* this works for meshes with deform verts only - constructive modifiers wont work properly*/