From: kruland2607 Date: Wed, 25 Jul 2012 21:24:19 +0000 (+0000) Subject: Fix fence post bug which happens when a motor config is removed from the rocket while... X-Git-Tag: upstream/12.09^2~84 X-Git-Url: https://git.gag.com/?p=debian%2Fopenrocket;a=commitdiff_plain;h=ab9a5f7f186e5773d215efb79fdfe68ef9ffa18b Fix fence post bug which happens when a motor config is removed from the rocket while still used by a simulation. git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@940 180e2498-e6e9-4542-8430-84ac67f01cd8 --- diff --git a/android/src/net/sf/openrocket/android/rocket/MotorConfigSpinner.java b/android/src/net/sf/openrocket/android/rocket/MotorConfigSpinner.java index ce5f2bd4..e8501785 100644 --- a/android/src/net/sf/openrocket/android/rocket/MotorConfigSpinner.java +++ b/android/src/net/sf/openrocket/android/rocket/MotorConfigSpinner.java @@ -73,7 +73,7 @@ public class MotorConfigSpinner extends Spinner { } selectedIndex++; } - if( selectedIndex > motorConfigs.length ) { + if( selectedIndex >= motorConfigs.length ) { selectedIndex = 0; }