updates for 0.9.4
[debian/openrocket] / src / net / sf / openrocket / gui / configdialog / FreeformFinSetConfig.java
index 52e02686afb00ae360f7e2d9d8e9e008d4bbb967..369b09b6b73b0251199bf0e5044b22f4c2d9a0a1 100644 (file)
@@ -450,6 +450,12 @@ public class FreeformFinSetConfig extends FinSetConfig {
                        if (!(o instanceof String))
                                return;
                        
+                       if (rowIndex < 0 || rowIndex >= finset.getFinPoints().length ||
+                                       columnIndex < 0 || columnIndex >= Columns.values().length) {
+                               throw new IllegalArgumentException("Index out of bounds, row="+rowIndex+
+                                               " column="+columnIndex+" fin point count="+finset.getFinPoints().length);
+                       }
+                       
                        String str = (String)o;
                        try {
                                
@@ -466,7 +472,5 @@ public class FreeformFinSetConfig extends FinSetConfig {
                        } catch (IllegalFinPointException ignore) {
                        }
                }
-               
-               
        }
 }