diff options
author | Ton Roosendaal <ton@blender.org> | 2005-12-07 15:46:34 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-12-07 15:46:34 +0300 |
commit | 5a514ae20eb4462eaa381e60fb295a65b96bf575 (patch) | |
tree | f1c88af2936516c7885302b71016403dd56226ab /source/blender/blenkernel/intern/depsgraph.c | |
parent | 1123be1bcc47b2e51d06371c9a174e145d3b0a73 (diff) |
Orange Bugfix: depsgraph code crashed on building particle system without
forcefields.... tsk!
Diffstat (limited to 'source/blender/blenkernel/intern/depsgraph.c')
-rw-r--r-- | source/blender/blenkernel/intern/depsgraph.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index ad598d719b2..cc73d68f9d6 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -471,21 +471,22 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int dag_add_relation(dag, node, node, DAG_RL_OB_DATA); listb= pdInitEffectors(ob, paf->group); /* note, makes copy... */ - - for(ec= listb->first; ec; ec= ec->next) { - Object *ob1= ec->ob; - PartDeflect *pd= ob1->pd; - - if(pd->forcefield) { - node2 = dag_get_node(dag, ob1); - if(pd->forcefield==PFIELD_GUIDE) - dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA); - else - dag_add_relation(dag, node2, node, DAG_RL_OB_DATA); + if(listb) { + for(ec= listb->first; ec; ec= ec->next) { + Object *ob1= ec->ob; + PartDeflect *pd= ob1->pd; + + if(pd->forcefield) { + node2 = dag_get_node(dag, ob1); + if(pd->forcefield==PFIELD_GUIDE) + dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA); + else + dag_add_relation(dag, node2, node, DAG_RL_OB_DATA); + } } + + pdEndEffectors(listb); /* restores copy... */ } - - pdEndEffectors(listb); /* restores copy... */ } } |