diff --git a/trunk/fcl/src/broad_phase_collision.cpp b/trunk/fcl/src/broad_phase_collision.cpp index dad4ba3110ea17ced6d65586bf28112eeee8f27c..7d4ae568f5cc578bf9e0326a1557e2e1d5951bf9 100644 --- a/trunk/fcl/src/broad_phase_collision.cpp +++ b/trunk/fcl/src/broad_phase_collision.cpp @@ -456,6 +456,9 @@ void SSaPCollisionManager::distance(CollisionObject* obj, void* cdata_, Distance void SSaPCollisionManager::collide(void* cdata, CollisionCallBack callback) const { + if (size() < 1) + return; + // simple sweep and prune method double delta_x = (objs_x[objs_x.size() - 1])->getAABB().min_[0] - (objs_x[0])->getAABB().min_[0]; double delta_y = (objs_x[objs_y.size() - 1])->getAABB().min_[1] - (objs_y[0])->getAABB().min_[1];