made texflag a short everywhere (only stores one flag)

fix for crash with separate (missing NULL check)
This commit is contained in:
2009-10-15 09:00:40 +00:00
parent a6645bfafb
commit a28b9512fe
6 changed files with 7 additions and 7 deletions

View File

@@ -114,7 +114,7 @@ int ray_hit_boundbox(struct BoundBox *bb, float ray_start[3], float ray_normal[3
void object_handle_update(struct Scene *scene, struct Object *ob);
float give_timeoffset(struct Object *ob);
int give_obdata_texspace(struct Object *ob, int **texflag, float **loc, float **size, float **rot);
int give_obdata_texspace(struct Object *ob, short **texflag, float **loc, float **size, float **rot);
int object_insert_ptcache(struct Object *ob);
// void object_delete_ptcache(struct Object *ob, int index);

View File

@@ -1102,7 +1102,7 @@ ParticleSystem *copy_particlesystem(ParticleSystem *psys)
pa->hair = MEM_dupallocN(pa->hair);
}
if(psysn->particles->keys || psysn->particles->boid) {
if(psysn->particles && (psysn->particles->keys || psysn->particles->boid)) {
ParticleKey *key = psysn->particles->keys;
BoidParticle *boid = psysn->particles->boid;
@@ -2475,7 +2475,7 @@ float give_timeoffset(Object *ob) {
}
}
int give_obdata_texspace(Object *ob, int **texflag, float **loc, float **size, float **rot) {
int give_obdata_texspace(Object *ob, short **texflag, float **loc, float **size, float **rot) {
if (ob->data==NULL)
return 0;