~yade-dev/yade/0.60

« back to all changes in this revision

Viewing changes to pkg/common/ForceEngine.cpp

  • Committer: Anton Gladky
  • Date: 2011-04-21 13:57:41 UTC
  • Revision ID: gladky.anton@gmail.com-20110421135741-qvlv41odxqcrfqq7
Fix crash, when force applied to non existing body

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 
15
15
void ForceEngine::action(){
16
16
        FOREACH(Body::id_t id, ids){
17
 
                assert(scene->bodies->exists(id));
 
17
                if (!(scene->bodies->exists(id))) continue;
18
18
                scene->forces.addForce(id,force);
19
19
        }
20
20
}