Switch from GPLv2 to GPLv2+
[fw/altos] / altosui / AltosUI.java
index 74e074632b81a263f27b939fee753067e92d28c4..2121690c87b367ddde06fb711c9bd41fe47dfd1c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -492,8 +493,8 @@ public class AltosUI extends AltosUIFrame {
                if (states == null)
                        return false;
                try {
-                       AltosFlightStats stats = new AltosFlightStats(states);
                        System.out.printf("%s:\n", file.toString());
+                       AltosFlightStats stats = new AltosFlightStats(states);
                        if (stats.serial != AltosLib.MISSING)
                                System.out.printf("Serial:       %5d\n", stats.serial);
                        if (stats.flight != AltosLib.MISSING)
@@ -612,15 +613,13 @@ public class AltosUI extends AltosUIFrame {
                                        File file = new File(args[i]);
                                        switch (process) {
                                        case process_none:
-                                       case process_graph:
                                                if (altosui == null)
                                                        altosui = new AltosUI();
+                                       case process_graph:
                                                if (!process_graph(file))
                                                        ++errors;
                                                break;
                                        case process_replay:
-                                               if (altosui == null)
-                                                       altosui = new AltosUI();
                                                if (!process_replay(file))
                                                        ++errors;
                                                break;