[#2276] Don't check for inline if grandparent is this component
This was a sneaky bug... Basically, if getAutoRadius was called on e.g. a body tube, which eventually ended in the `inline` call, and candidate.parent.parent was this component, then the getRadius method would cause an infinite loop (stackoverflow), because it calls getAutoRadius
This commit is contained in:
parent
5bb71e8dde
commit
9183bde51e
@ -852,8 +852,8 @@ public abstract class SymmetricComponent extends BodyComponent implements BoxBou
|
||||
(!MathUtil.equals(this.parent.getRadiusMethod().getRadius(this.parent.parent, this, this.parent.getRadiusOffset()), 0)))
|
||||
return false;
|
||||
|
||||
if ((candidate.parent instanceof RingInstanceable) &&
|
||||
(!MathUtil.equals(candidate.parent.getRadiusMethod().getRadius(candidate.parent.parent, candidate, candidate.parent.getRadiusOffset()), 0)))
|
||||
if ((candidate.parent instanceof RingInstanceable) && ((candidate.parent.parent == this) ||
|
||||
(!MathUtil.equals(candidate.parent.getRadiusMethod().getRadius(candidate.parent.parent, candidate, candidate.parent.getRadiusOffset()), 0))))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user