Commit 79a79ef6 authored by Luc Maisonobe's avatar Luc Maisonobe
Browse files

Fixed null pointer exception.

parent 98964e08
Pipeline #1516 passed with stages
in 29 minutes and 29 seconds
......@@ -573,14 +573,16 @@ public abstract class AbstractIntegratedPropagator extends AbstractPropagator {
os.getPrimaryState(),
os.getPrimaryDerivative(),
propagationType);
final double[] secondary = os.getSecondaryState(1);
int offset = 0;
for (final IntegrableGenerator generator : integrableGenerators) {
s = s.addAdditionalState(generator.getName(),
Arrays.copyOfRange(secondary,
offset,
offset + generator.getDimension()));
offset += generator.getDimension();
if (os.getNumberOfSecondaryStates() > 0) {
final double[] secondary = os.getSecondaryState(1);
int offset = 0;
for (final IntegrableGenerator generator : integrableGenerators) {
s = s.addAdditionalState(generator.getName(),
Arrays.copyOfRange(secondary,
offset,
offset + generator.getDimension()));
offset += generator.getDimension();
}
}
s = updateAdditionalStates(s);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment