Prevent NullPointerException.

This commit is contained in:
Luc Maisonobe 2016-01-06 13:22:26 +01:00
parent c246b37dbe
commit 0ddec2917a
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ public class FieldODEState<T extends RealFieldElement<T>> {
* @return number of secondary states.
*/
public int getNumberOfSecondaryStates() {
return secondaryState.length;
return secondaryState == null ? 0 : secondaryState.length;
}
/** Get secondary state dimension.