Skip to content

Commit 542e070

Browse files
authored
Merge pull request #1326 from ctrlaltdavid/fix/avatar-crash
Fix avatar crash
2 parents 18cc4cd + 96708f5 commit 542e070

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libraries/physics/src/MultiSphereShape.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ void MultiSphereShape::calculateDebugLines() {
486486
break;
487487
}
488488
}
489-
}
489+
}
490490
calculateChamferBox(_debugLines, radiuses, axes, _midPoint);
491491
} else if (_spheres.size() == 8) {
492492
std::vector<glm::vec3> axes;
@@ -508,6 +508,10 @@ void MultiSphereShape::connectEdges(std::vector<std::pair<glm::vec3, glm::vec3>>
508508
}
509509

510510
void MultiSphereShape::calculateChamferBox(std::vector<std::pair<glm::vec3, glm::vec3>>& outLines, const std::vector<float>& radiuses, const std::vector<glm::vec3>& axes, const glm::vec3& translation) {
511+
if (radiuses.size() == 0) {
512+
return;
513+
}
514+
511515
std::vector<std::pair<glm::vec3, glm::vec3>> sphereLines;
512516
calculateSphereLines(sphereLines, glm::vec3(0.0f), radiuses[0]);
513517

0 commit comments

Comments
 (0)