fix for [#11136] Segmentation fault when copying objects with hairs

This commit is contained in:
Campbell Barton 2008-05-11 11:34:39 +00:00
parent aa471f6a80
commit a2528b4123
2 changed files with 6 additions and 2 deletions

@ -1054,7 +1054,11 @@ ParticleSystem *copy_particlesystem(ParticleSystem *psys)
psysn->childcache= NULL;
psysn->edit= NULL;
psysn->effectors.first= psysn->effectors.last= 0;
psysn->pathcachebufs.first = psysn->pathcachebufs.last = NULL;
psysn->reactevents.first = psysn->reactevents.last = NULL;
psysn->renderdata = NULL;
psysn->pointcache= BKE_ptcache_copy(psys->pointcache);
id_us_plus((ID *)psysn->part);

@ -168,7 +168,7 @@ typedef struct ParticleSettings {
struct PartDeflect *pd;
} ParticleSettings;
typedef struct ParticleSystem{
typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in copy_particlesystem */
struct ParticleSystem *next, *prev;
ParticleSettings *part; /* particle settings */