diff --git a/include/fcl/collision_object.h b/include/fcl/collision_object.h index f23a8984796a9675794767c3cc6fc0ad7464b1e0..33b0aec89c80d21a4efe10962eebc26163e8e1b1 100644 --- a/include/fcl/collision_object.h +++ b/include/fcl/collision_object.h @@ -153,8 +153,11 @@ public: CollisionObject(const boost::shared_ptr<CollisionGeometry> &cgeom_) : cgeom(cgeom_), cgeom_const(cgeom_) { - cgeom->computeLocalAABB(); - computeAABB(); + if (cgeom) + { + cgeom->computeLocalAABB(); + computeAABB(); + } } CollisionObject(const boost::shared_ptr<CollisionGeometry> &cgeom_, const Transform3f& tf) :