From ad34da44f6d46cf821f8dd66896cb17c37c86c16 Mon Sep 17 00:00:00 2001 From: kruland2607 Date: Sun, 26 Feb 2012 14:59:59 +0000 Subject: [PATCH] Only keep the motor if it was parsed correctly. git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@446 180e2498-e6e9-4542-8430-84ac67f01cd8 --- .../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 bcb567da..6b74c285 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()); -- 2.47.2