From: kruland2607 Date: Sun, 26 Feb 2012 14:59:59 +0000 (+0000) Subject: Only keep the motor if it was parsed correctly. X-Git-Tag: upstream/12.03~1^2~25 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=ad34da44f6d46cf821f8dd66896cb17c37c86c16;p=debian%2Fopenrocket 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 --- 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());