Skip to content

Conversation

@SiboVG
Copy link
Member

@SiboVG SiboVG commented Dec 23, 2024

This PR fixes #2626. There was an issue for 0-length transitions that got loaded from the .ork file. The Transition was loaded, which initializes the CG to null. Then calculateProperties() was called on the Transition, which first goes to calculateProperties() of SymmetricComponent, but because the length was 0, the method immediately returned, leaving the CG to null, and causing the NullPointerException. This PR just initializes the CG in calculateProperties() of SymmetricComponent so it cannot be null.

There was an issue for 0-length transitions that got loaded from the .ork file. The Transition was created, which initialized the CG to null. Then calculateProperties() was called on the Transition, which first goes to calculateProperties() of SymmetricComponent, but because the length is 0, the method immediately returned, leaving the CG to null, and causing the NullPointerException.
@JoePfeiffer JoePfeiffer merged commit b7e31b5 into openrocket:unstable Dec 23, 2024
1 check passed
@SiboVG SiboVG deleted the issue-2626 branch December 24, 2024 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

These ORK files created in 23.09 cause exceptions while loading in 24.12 beta 1

2 participants