diff --git a/libraries/physics/src/MultiSphereShape.cpp b/libraries/physics/src/MultiSphereShape.cpp index ca5346cd4c..71702ac62b 100644 --- a/libraries/physics/src/MultiSphereShape.cpp +++ b/libraries/physics/src/MultiSphereShape.cpp @@ -486,7 +486,7 @@ void MultiSphereShape::calculateDebugLines() { break; } } - } + } calculateChamferBox(_debugLines, radiuses, axes, _midPoint); } else if (_spheres.size() == 8) { std::vector axes; @@ -508,6 +508,10 @@ void MultiSphereShape::connectEdges(std::vector> } void MultiSphereShape::calculateChamferBox(std::vector>& outLines, const std::vector& radiuses, const std::vector& axes, const glm::vec3& translation) { + if (radiuses.size() == 0) { + return; + } + std::vector> sphereLines; calculateSphereLines(sphereLines, glm::vec3(0.0f), radiuses[0]);