------------------------------------------------------------ revno: 2897 committer: Anton Gladky <[email protected]> branch nick: yade timestamp: Thu 2011-07-21 11:45:13 +0200 message: Add comment on doubtful check of b2 in InteractionContainer::erase modified: core/InteractionContainer.cpp
-- lp:yade https://code.launchpad.net/~yade-dev/yade/trunk Your team Yade developers is subscribed to branch lp:yade. To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'core/InteractionContainer.cpp' --- core/InteractionContainer.cpp 2011-07-20 12:42:36 +0000 +++ core/InteractionContainer.cpp 2011-07-21 09:45:13 +0000 @@ -46,7 +46,9 @@ if(unlikely(id2>=(Body::id_t)bodies->size())) return false; // no such interaction const shared_ptr<Body>& b1((*bodies)[id1]); const shared_ptr<Body>& b2((*bodies)[id2]); - if((!b1) or (!b2)) return false; // bodies are vanished + if((!b1) or (!b2)) return false; // Bodies are vanished. Initially (before r2893) only b1 was checked on existence. + // But, it seems, that b2 also needs to be checked. The logic of the algorithm + // should be investigated. Bug-link https://bugs.launchpad.net/yade/+bug/813925 Body::MapId2IntrT::iterator I(b1->intrs.find(id2)); // this used to return false if(I==b1->intrs.end()) {
_______________________________________________ Mailing list: https://launchpad.net/~yade-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp

