From e094a43c45934ca43161363964839810fc2f4972 Mon Sep 17 00:00:00 2001 From: Kevin Ruland Date: Sun, 26 Feb 2012 14:59:59 +0000 Subject: [PATCH] Only keep the motor if it was parsed correctly. --- .../net/sf/openrocket/android/thrustcurve/ThrustCurveAPI.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/src/net/sf/openrocket/android/thrustcurve/ThrustCurveAPI.java b/android/src/net/sf/openrocket/android/thrustcurve/ThrustCurveAPI.java index bcb567da0..6b74c2856 100644 --- a/android/src/net/sf/openrocket/android/thrustcurve/ThrustCurveAPI.java +++ b/android/src/net/sf/openrocket/android/thrustcurve/ThrustCurveAPI.java @@ -139,7 +139,9 @@ public abstract class ThrustCurveAPI { for( MotorBurnFile entry : listOfMotors ) { ThrustCurveMotor motor = entry.getThrustCurveMotor(); - motorsByDesignation.put( motor.getDesignation(), motor); + if ( motor != null ) { + motorsByDesignation.put( motor.getDesignation(), motor); + } } return new ArrayList(motorsByDesignation.values());