check for children before taking child in geometry check.

This commit is contained in:
JoePfeiffer 2023-01-20 17:45:47 -07:00
parent 458e9e3d3d
commit c286eeaa16

View File

@ -291,7 +291,8 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
SymmetricComponent prevComp = null;
if ((treeRoot instanceof ComponentAssembly) &&
(!(treeRoot instanceof Rocket))) {
(!(treeRoot instanceof Rocket)) &&
(treeRoot.getChildCount() > 0)) {
prevComp = ((SymmetricComponent) (treeRoot.getChild(0))).getPreviousSymmetricComponent();
}