← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2961: Add check on body existance in GlobalStiffnessTimeStepper. Fixes LP:891540

 

------------------------------------------------------------
revno: 2961
fixes bug: https://launchpad.net/bugs/891540
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: yade
timestamp: Fri 2011-11-18 13:25:48 +0100
message:
  Add check on body existance in GlobalStiffnessTimeStepper. Fixes LP:891540
modified:
  pkg/dem/GlobalStiffnessTimeStepper.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 'pkg/dem/GlobalStiffnessTimeStepper.cpp'
--- pkg/dem/GlobalStiffnessTimeStepper.cpp	2010-11-07 11:46:20 +0000
+++ pkg/dem/GlobalStiffnessTimeStepper.cpp	2011-11-18 12:25:48 +0000
@@ -73,6 +73,7 @@
 	BodyContainer::iterator biEnd = bodies->end();
 	for(  ; bi!=biEnd ; ++bi )
 	{
+		if (!*bi)  continue;
 		shared_ptr<Body> b = *bi;
 		if (b->isDynamic()) findTimeStepFromBody(b, ncb);
 	}


Follow ups